ReactOS  0.4.13-dev-52-g0efcfec
ke.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel - Vista+ APIs
3  * LICENSE: GPL v2 - See COPYING in the top level directory
4  * FILE: lib/drivers/ntoskrnl_vista/ke.c
5  * PURPOSE: Ke functions of Vista+
6  * PROGRAMMERS: Pierre Schweitzer <pierre@reactos.org>
7  */
8 
9 #include <ntdef.h>
10 #include <ntifs.h>
11 
13 ULONG
14 NTAPI
16 {
18  KAFFINITY ActiveMap = KeQueryActiveProcessors();
19 
20  if (ActiveProcessors != NULL)
21  {
22  *ActiveProcessors = ActiveMap;
23  }
24 
25  RtlInitializeBitMap(&Bitmap, (PULONG)&ActiveMap, sizeof(ActiveMap) * 8);
26  return RtlNumberOfSetBits(&Bitmap);
27 }
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
KAFFINITY * PKAFFINITY
Definition: basetsd.h:197
smooth NULL
Definition: ftsmooth.c:416
#define NTKERNELAPI
KAFFINITY NTAPI KeQueryActiveProcessors(VOID)
Definition: cpu.c:433
NTKERNELAPI ULONG NTAPI KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL)
Definition: ke.c:15
ULONG_PTR KAFFINITY
Definition: compat.h:75
unsigned int * PULONG
Definition: retypes.h:1
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68