ReactOS  0.4.14-dev-583-g2a1ba2c
KeEvent.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: Kernel-Mode Test Suite Event test
5  * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include <kmt_test.h>
9 
10 #define CheckEvent(Event, ExpectedType, State, ExpectedWaitNext, \
11  Irql, ThreadList, ThreadCount) do \
12 { \
13  INT TheIndex; \
14  PLIST_ENTRY TheEntry; \
15  PKTHREAD TheThread; \
16  ok_eq_uint((Event)->Header.Type, ExpectedType); \
17  ok_eq_uint((Event)->Header.Hand, sizeof *(Event) / sizeof(ULONG)); \
18  ok_eq_hex((Event)->Header.Lock & 0xFF00FF00L, 0x55005500L); \
19  ok_eq_long((Event)->Header.SignalState, State); \
20  TheEntry = (Event)->Header.WaitListHead.Flink; \
21  for (TheIndex = 0; TheIndex < (ThreadCount); ++TheIndex) \
22  { \
23  TheThread = CONTAINING_RECORD(TheEntry, KTHREAD, \
24  WaitBlock[0].WaitListEntry); \
25  ok_eq_pointer(TheThread, (ThreadList)[TheIndex]); \
26  ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \
27  TheEntry = TheEntry->Flink; \
28  } \
29  ok_eq_pointer(TheEntry, &(Event)->Header.WaitListHead); \
30  ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \
31  ok_eq_long(KeReadStateEvent(Event), State); \
32  ok_eq_bool(Thread->WaitNext, ExpectedWaitNext); \
33  ok_irql(Irql); \
34 } while (0)
35 
36 static
37 VOID
41  IN KIRQL OriginalIrql)
42 {
43  LONG State;
45 
46  memset(Event, 0x55, sizeof *Event);
48  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
49 
50  memset(Event, 0x55, sizeof *Event);
52  CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
53 
54  Event->Header.SignalState = 0x12345678L;
55  CheckEvent(Event, Type, 0x12345678L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
56 
58  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
59  ok_eq_long(State, 0x12345678L);
60 
61  Event->Header.SignalState = 0x12345678L;
63  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
64 
65  State = KeSetEvent(Event, 0, FALSE);
66  CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
67  ok_eq_long(State, 0L);
68 
70  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
71  ok_eq_long(State, 1L);
72 
73  Event->Header.SignalState = 0x23456789L;
74  State = KeSetEvent(Event, 0, FALSE);
75  CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
76  ok_eq_long(State, 0x23456789L);
77 
78  Event->Header.SignalState = 0x3456789AL;
80  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0);
81  ok_eq_long(State, 0x3456789AL);
82 
83  /* Irql is raised to DISPATCH_LEVEL here, which kills checked build,
84  * a spinlock is acquired and never released, which kills MP build */
85  if ((OriginalIrql <= DISPATCH_LEVEL || !KmtIsCheckedBuild) &&
87  {
88  Event->Header.SignalState = 0x456789ABL;
89  State = KeSetEvent(Event, 0, TRUE);
91  ok_eq_long(State, 0x456789ABL);
92  ok_eq_uint(Thread->WaitIrql, OriginalIrql);
93  /* repair the "damage" */
94  Thread->WaitNext = FALSE;
95  KmtSetIrql(OriginalIrql);
96 
97  Event->Header.SignalState = 0x56789ABCL;
100  ok_eq_long(State, 0x56789ABCL);
101  ok_eq_uint(Thread->WaitIrql, OriginalIrql);
102  /* repair the "damage" */
103  Thread->WaitNext = FALSE;
104  KmtSetIrql(OriginalIrql);
105  }
106 
107  ok_irql(OriginalIrql);
108  KmtSetIrql(OriginalIrql);
109 }
110 
111 typedef struct
112 {
113  HANDLE Handle;
116  volatile BOOLEAN Signal;
118 
119 static
120 VOID
121 NTAPI
124 {
127 
128  ok_irql(PASSIVE_LEVEL);
129  ThreadData->Signal = TRUE;
132  ok_irql(PASSIVE_LEVEL);
133 }
134 
136 
137 static
138 VOID
140  IN PKEVENT Event,
142  IN KIRQL OriginalIrql,
144  KPRIORITY PriorityIncrement,
145  LONG ExpectedState,
146  BOOLEAN SatisfiesAll)
147 {
149  THREAD_DATA Threads[5];
150  const INT ThreadCount = sizeof Threads / sizeof Threads[0];
152  LARGE_INTEGER LongTimeout, ShortTimeout;
153  INT i;
154  KWAIT_BLOCK WaitBlock[RTL_NUMBER_OF(Threads)];
155  PVOID ThreadObjects[RTL_NUMBER_OF(Threads)];
156  LONG State;
159 
160  LongTimeout.QuadPart = -100 * MILLISECOND;
161  ShortTimeout.QuadPart = -1 * MILLISECOND;
162 
164 
165  for (i = 0; i < ThreadCount; ++i)
166  {
167  Threads[i].Event = Event;
168  Threads[i].Signal = FALSE;
170  NULL,
172  NULL,
173  NULL);
178  ThreadObjects[i] = Threads[i].Thread;
180  ok_eq_long(Priority, 8L);
181  while (!Threads[i].Signal)
182  {
183  Status = KeDelayExecutionThread(KernelMode, FALSE, &ShortTimeout);
184  if (Status != STATUS_SUCCESS)
185  {
187  }
188  }
189  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, ThreadObjects, i + 1);
190  }
191 
192  /* the threads shouldn't wake up on their own */
193  Status = KeDelayExecutionThread(KernelMode, FALSE, &ShortTimeout);
195 
196  for (i = 0; i < ThreadCount; ++i)
197  {
198  CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, ThreadObjects + i, ThreadCount - i);
199  State = SetEvent(Event, PriorityIncrement + i, FALSE);
200 
201  ok_eq_long(State, 0L);
202  CheckEvent(Event, Type, ExpectedState, FALSE, OriginalIrql, ThreadObjects + i + 1, SatisfiesAll ? 0 : ThreadCount - i - 1);
203  Status = KeWaitForMultipleObjects(ThreadCount, ThreadObjects, SatisfiesAll ? WaitAll : WaitAny, Executive, KernelMode, FALSE, &LongTimeout, WaitBlock);
205  if (SatisfiesAll)
206  {
207  for (; i < ThreadCount; ++i)
208  {
210  ok_eq_long(Priority, max(min(8L + PriorityIncrement, 15L), 8L));
211  }
212  break;
213  }
215  ok_eq_long(Priority, max(min(8L + PriorityIncrement + i, 15L), 8L));
216  /* replace the thread with the current thread - which will never signal */
217  if (!skip((Status & 0x3F) < ThreadCount, "Index out of bounds\n"))
218  ThreadObjects[Status & 0x3F] = Thread;
219  Status = KeWaitForMultipleObjects(ThreadCount, ThreadObjects, WaitAny, Executive, KernelMode, FALSE, &ShortTimeout, WaitBlock);
221  }
222 
223  for (i = 0; i < ThreadCount; ++i)
224  {
225  ObDereferenceObject(Threads[i].Thread);
226  Status = ZwClose(Threads[i].Handle);
228  }
229 }
230 
231 #define NUM_SCHED_TESTS 1000
232 
233 typedef struct
234 {
239  ULONG CounterValues[NUM_SCHED_TESTS];
241 
242 static
243 VOID
244 NTAPI
247 {
249  PKEVENT Event = &ThreadData->Event;
250  volatile ULONG *Counter = &ThreadData->Counter;
251  ULONG *CounterValue = ThreadData->CounterValues;
253 
255  ok_eq_long(Priority, 8L);
256 
257  while (CounterValue < &ThreadData->CounterValues[NUM_SCHED_TESTS])
258  {
259  KeSetEvent(&ThreadData->WaitEvent, IO_NO_INCREMENT, TRUE);
261  *CounterValue++ = *Counter;
262  }
263 
265  ok_eq_long(Priority, 8L + min(ThreadData->PriorityIncrement, 7));
266 }
267 
268 static
269 VOID
270 NTAPI
273 {
278  ULONG i;
279  volatile ULONG *Counter;
280  KPRIORITY PriorityIncrement;
282 
284 
286  if (skip(ThreadData != NULL, "Out of memory\n"))
287  {
288  return;
289  }
292  Counter = &ThreadData->Counter;
293 
294  for (PriorityIncrement = 0; PriorityIncrement <= 8; PriorityIncrement++)
295  {
296  ThreadData->PriorityIncrement = PriorityIncrement;
297  ThreadData->Counter = 0;
298  RtlFillMemory(ThreadData->CounterValues,
299  sizeof(ThreadData->CounterValues),
300  0xFE);
303  ok(Priority == 8, "[%lu] Priority = %lu\n", PriorityIncrement, Priority);
304  for (i = 1; i <= NUM_SCHED_TESTS; i++)
305  {
308  PreviousState = KeSetEvent(&ThreadData->Event, PriorityIncrement, FALSE);
309  *Counter = i;
311  }
313  ok(Priority == 8, "[%lu] Priority = %lu\n", PriorityIncrement, Priority);
315 
316  if (PriorityIncrement == 0)
317  {
318  /* Both threads have the same priority, so either can win the race */
319  ok(ThreadData->CounterValues[0] == 0 || ThreadData->CounterValues[0] == 1,
320  "[%lu] Counter 0 = %lu\n",
321  PriorityIncrement, ThreadData->CounterValues[0]);
322  }
323  else
324  {
325  /* CountThread has the higher priority, it will always win */
326  ok(ThreadData->CounterValues[0] == 0,
327  "[%lu] Counter 0 = %lu\n",
328  PriorityIncrement, ThreadData->CounterValues[0]);
329  }
330  for (i = 1; i < NUM_SCHED_TESTS; i++)
331  {
332  if (PriorityIncrement == 0)
333  {
334  ok(ThreadData->CounterValues[i] == i ||
335  ThreadData->CounterValues[i] == i + 1,
336  "[%lu] Counter %lu = %lu, expected %lu or %lu\n",
337  PriorityIncrement, i,
338  ThreadData->CounterValues[i], i, i + 1);
339  }
340  else
341  {
342  ok(ThreadData->CounterValues[i] == ThreadData->CounterValues[i - 1] + 1,
343  "[%lu] Counter %lu = %lu, expected %lu\n",
344  PriorityIncrement, i,
345  ThreadData->CounterValues[i], ThreadData->CounterValues[i - 1] + 1);
346  }
347  }
348  }
349 
350  ExFreePoolWithTag(ThreadData, 'CEmK');
351 }
352 
353 START_TEST(KeEvent)
354 {
356  KEVENT Event;
357  KIRQL Irql;
359  ULONG i;
360  KPRIORITY PriorityIncrement;
361 
362  for (i = 0; i < RTL_NUMBER_OF(Irqls); ++i)
363  {
364  KeRaiseIrql(Irqls[i], &Irql);
367  KeLowerIrql(Irql);
368  }
369 
370  for (i = 0; i < RTL_NUMBER_OF(Irqls); ++i)
371  {
372  /* creating threads above DISPATCH_LEVEL... nope */
373  if (Irqls[i] >= DISPATCH_LEVEL)
374  continue;
375  KeRaiseIrql(Irqls[i], &Irql);
376  trace("IRQL: %u\n", Irqls[i]);
377  for (PriorityIncrement = -1; PriorityIncrement <= 8; ++PriorityIncrement)
378  {
379  if (PriorityIncrement < 0 && KmtIsCheckedBuild)
380  continue;
381  trace("PriorityIncrement: %ld\n", PriorityIncrement);
382  trace("-> Checking KeSetEvent, NotificationEvent\n");
383  TestEventConcurrent(&Event, NotificationEvent, Irqls[i], KeSetEvent, PriorityIncrement, 1, TRUE);
384  trace("-> Checking KeSetEvent, SynchronizationEvent\n");
385  TestEventConcurrent(&Event, SynchronizationEvent, Irqls[i], KeSetEvent, PriorityIncrement, 0, FALSE);
386  trace("-> Checking KePulseEvent, NotificationEvent\n");
387  TestEventConcurrent(&Event, NotificationEvent, Irqls[i], KePulseEvent, PriorityIncrement, 0, TRUE);
388  trace("-> Checking KePulseEvent, SynchronizationEvent\n");
389  TestEventConcurrent(&Event, SynchronizationEvent, Irqls[i], KePulseEvent, PriorityIncrement, 0, FALSE);
390  }
391  KeLowerIrql(Irql);
392  }
393 
394  ok_irql(PASSIVE_LEVEL);
396 
399 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define MILLISECOND
Definition: kmt_test.h:271
#define IN
Definition: typedefs.h:38
#define max(a, b)
Definition: svc.c:63
#define GENERIC_ALL
Definition: nt_native.h:92
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define TRUE
Definition: types.h:120
PKTHREAD KmtStartThread(IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext OPTIONAL)
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define CheckEvent(Event, ExpectedType, State, ExpectedWaitNext, Irql, ThreadList, ThreadCount)
Definition: KeEvent.c:10
Type
Definition: Type.h:6
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NTSTATUS
Definition: precomp.h:26
_In_ KPRIORITY Priority
Definition: kefuncs.h:516
LONG(NTAPI * PSET_EVENT_FUNCTION)(PRKEVENT, KPRIORITY, BOOLEAN)
Definition: KeEvent.c:135
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
KPRIORITY PriorityIncrement
Definition: KeEvent.c:238
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
KPRIORITY NTAPI KeQueryPriorityThread(IN PKTHREAD Thread)
Definition: thrdobj.c:1017
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
_Out_ PKIRQL Irql
Definition: csq.h:179
int32_t INT
Definition: typedefs.h:56
LONG KPRIORITY
Definition: compat.h:462
PKTHREAD Thread
Definition: ExFastMutex.c:143
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
UCHAR KIRQL
Definition: env_spec_w32.h:591
BOOLEAN KmtIsCheckedBuild
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define STATUS_WAIT_0
Definition: ntstatus.h:223
static VOID NTAPI CountThread(IN OUT PVOID Context)
Definition: KeEvent.c:245
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:496
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
long LONG
Definition: pedump.c:60
NTSTATUS NTAPI KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Interval OPTIONAL)
Definition: wait.c:283
KEVENT WaitEvent
Definition: KeEvent.c:236
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
VOID KmtSetIrql(IN KIRQL NewIrql)
BOOLEAN KmtIsMultiProcessorBuild
LONG NTAPI KePulseEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:68
volatile BOOLEAN Signal
Definition: KeEvent.c:116
struct _KEVENT PRKEVENT
enum _EVENT_TYPE EVENT_TYPE
_In_ HANDLE Handle
Definition: extypes.h:390
PKEVENT Event
Definition: KeEvent.c:115
#define trace
Definition: atltest.h:70
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
volatile int Signal
Definition: gdblib.c:102
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
Definition: wait.c:586
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
static VOID TestEventFunctional(IN PKEVENT Event, IN EVENT_TYPE Type, IN KIRQL OriginalIrql)
Definition: KeEvent.c:38
POBJECT_TYPE PsThreadType
Definition: thread.c:20
static const WCHAR L[]
Definition: oid.c:1250
#define SYNCHRONIZE
Definition: nt_native.h:61
static VOID NTAPI TestEventScheduling(_In_ PVOID Context)
Definition: KeEvent.c:271
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
VOID KmtFinishThread(IN PKTHREAD Thread OPTIONAL, IN PKEVENT Event OPTIONAL)
Status
Definition: gdiplustypes.h:24
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:204
_In_ PLARGE_INTEGER _In_opt_ PTIMER_APC_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_opt_ LONG _Out_opt_ PBOOLEAN PreviousState
Definition: zwfuncs.h:428
static VOID TestEventConcurrent(IN PKEVENT Event, IN EVENT_TYPE Type, IN KIRQL OriginalIrql, PSET_EVENT_FUNCTION SetEvent, KPRIORITY PriorityIncrement, LONG ExpectedState, BOOLEAN SatisfiesAll)
Definition: KeEvent.c:139
enum State_ State
Definition: pofuncs.h:54
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define ok(value,...)
Definition: atltest.h:57
START_TEST(KeEvent)
Definition: KeEvent.c:353
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
Definition: thread.c:602
#define min(a, b)
Definition: monoChain.cc:55
static LARGE_INTEGER Counter
Definition: clock.c:43
#define skip(...)
Definition: atltest.h:64
static VOID NTAPI WaitForEventThread(IN OUT PVOID Context)
Definition: KeEvent.c:122
#define BOOLEAN
Definition: pedump.c:73
#define OUT
Definition: typedefs.h:39
LONG NTAPI KeResetEvent(IN PKEVENT Event)
Definition: eventobj.c:133
struct tagContext Context
Definition: acpixf.h:1030
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
struct THREAD_DATA * PTHREAD_DATA
#define ok_eq_hex(value, expected)
#define ok_eq_uint(value, expected)
Definition: kmt_test.h:239
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define KeGetCurrentThread
Definition: hal.h:44
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
return STATUS_SUCCESS
Definition: btrfs.c:2938
#define memset(x, y, z)
Definition: compat.h:39
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:593
struct COUNT_THREAD_DATA * PCOUNT_THREAD_DATA
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define ok_eq_long(value, expected)
Definition: kmt_test.h:240
#define NUM_SCHED_TESTS
Definition: KeEvent.c:231
LONGLONG QuadPart
Definition: typedefs.h:112