ReactOS  0.4.15-dev-1197-g8081ba9
ExFastMutex.c File Reference
#include <kmt_test.h>
#include <debug.h>
Include dependency graph for ExFastMutex.c:

Go to the source code of this file.

Classes

struct  THREAD_DATA
 

Macros

#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, ExpectedContention, ExpectedOldIrql, ExpectedIrql)
 

Typedefs

typedef VOID(FASTCALLPMUTEX_FUNCTION) (PFAST_MUTEX)
 
typedef BOOLEAN(FASTCALLPMUTEX_TRY_FUNCTION) (PFAST_MUTEX)
 
typedef struct THREAD_DATAPTHREAD_DATA
 

Functions

static VOID (FASTCALL *pExEnterCriticalRegionAndAcquireFastMutexUnsafe)(_Inout_ PFAST_MUTEX FastMutex)
 
static BOOLEAN (FASTCALL *pExiTryToAcquireFastMutex)(IN OUT PFAST_MUTEX FastMutex)
 
static VOID TestFastMutex (PFAST_MUTEX Mutex, KIRQL OriginalIrql)
 
static VOID NTAPI AcquireMutexThread (PVOID Parameter)
 
static VOID InitThreadData (PTHREAD_DATA ThreadData, PFAST_MUTEX Mutex, PMUTEX_FUNCTION Acquire, PMUTEX_TRY_FUNCTION TryAcquire, PMUTEX_FUNCTION Release)
 
static NTSTATUS StartThread (PTHREAD_DATA ThreadData, PLARGE_INTEGER Timeout, KIRQL Irql, BOOLEAN Try, BOOLEAN RetExpected)
 
static VOID FinishThread (PTHREAD_DATA ThreadData)
 
static VOID TestFastMutexConcurrent (PFAST_MUTEX Mutex)
 
 START_TEST (ExFastMutex)
 

Macro Definition Documentation

◆ CheckMutex

#define CheckMutex (   Mutex,
  ExpectedCount,
  ExpectedOwner,
  ExpectedContention,
  ExpectedOldIrql,
  ExpectedIrql 
)
Value:
do \
{ \
ok_eq_long((Mutex)->Count, ExpectedCount); \
ok_eq_pointer((Mutex)->Owner, ExpectedOwner); \
ok_eq_ulong((Mutex)->Contention, ExpectedContention); \
ok_eq_ulong((Mutex)->OldIrql, (ULONG)ExpectedOldIrql); \
ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); \
ok_irql(ExpectedIrql); \
} while (0)
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
Definition: Mutex.h:15
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790
BOOLEAN NTAPI KeAreApcsDisabled(VOID)
Definition: apc.c:958
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1556
unsigned int ULONG
Definition: retypes.h:1

Definition at line 31 of file ExFastMutex.c.

Typedef Documentation

◆ PMUTEX_FUNCTION

typedef VOID(FASTCALL * PMUTEX_FUNCTION) (PFAST_MUTEX)

Definition at line 137 of file ExFastMutex.c.

◆ PMUTEX_TRY_FUNCTION

typedef BOOLEAN(FASTCALL * PMUTEX_TRY_FUNCTION) (PFAST_MUTEX)

Definition at line 138 of file ExFastMutex.c.

◆ PTHREAD_DATA

Function Documentation

◆ AcquireMutexThread()

static VOID NTAPI AcquireMutexThread ( PVOID  Parameter)
static

Definition at line 158 of file ExFastMutex.c.

160 {
162  KIRQL Irql;
163  BOOLEAN Ret = FALSE;
165 
166  KeRaiseIrql(ThreadData->Irql, &Irql);
167 
168  if (ThreadData->Try)
169  {
170  Ret = ThreadData->TryAcquire(ThreadData->Mutex);
171  ok_eq_bool(Ret, ThreadData->RetExpected);
172  }
173  else
174  ThreadData->Acquire(ThreadData->Mutex);
175 
176  ok_bool_false(KeSetEvent(&ThreadData->OutEvent, 0, TRUE), "KeSetEvent returned");
179 
180  if (!ThreadData->Try || Ret)
181  ThreadData->Release(ThreadData->Mutex);
182 
183  KeLowerIrql(Irql);
184 }
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
_In_ PVOID Parameter
Definition: ldrtypes.h:241
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
#define ok_bool_false(value, desc)
Definition: kmt_test.h:257
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define ok_eq_bool(value, expected)
Definition: kmt_test.h:258
Status
Definition: gdiplustypes.h:24
#define ok_eq_hex(value, expected)
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by StartThread().

◆ BOOLEAN()

static BOOLEAN ( FASTCALL pExiTryToAcquireFastMutex)
static

◆ FinishThread()

static VOID FinishThread ( PTHREAD_DATA  ThreadData)
static

Definition at line 229 of file ExFastMutex.c.

231 {
233 
234  KeSetEvent(&ThreadData->InEvent, 0, TRUE);
237 
241  KeClearEvent(&ThreadData->InEvent);
242  KeClearEvent(&ThreadData->OutEvent);
243 }
#define TRUE
Definition: types.h:120
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
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
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
HANDLE Handle
Definition: drwtsn32.h:25
Status
Definition: gdiplustypes.h:24
#define ok_eq_hex(value, expected)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by TestFastMutexConcurrent().

◆ InitThreadData()

static VOID InitThreadData ( PTHREAD_DATA  ThreadData,
PFAST_MUTEX  Mutex,
PMUTEX_FUNCTION  Acquire,
PMUTEX_TRY_FUNCTION  TryAcquire,
PMUTEX_FUNCTION  Release 
)
static

Definition at line 188 of file ExFastMutex.c.

194 {
195  ThreadData->Mutex = Mutex;
198  ThreadData->Acquire = Acquire;
199  ThreadData->TryAcquire = TryAcquire;
200  ThreadData->Release = Release;
201 }
#define FALSE
Definition: types.h:117
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
static PFAST_MUTEX Mutex
Definition: timer.c:22
_In_ BOOLEAN Release
Definition: cdrom.h:920

Referenced by TestFastMutexConcurrent().

◆ START_TEST()

START_TEST ( ExFastMutex  )

Definition at line 311 of file ExFastMutex.c.

312 {
314  KIRQL Irql;
315 
316  pExEnterCriticalRegionAndAcquireFastMutexUnsafe = KmtGetSystemRoutineAddress(L"ExEnterCriticalRegionAndAcquireFastMutexUnsafe");
317  pExReleaseFastMutexUnsafeAndLeaveCriticalRegion = KmtGetSystemRoutineAddress(L"ExReleaseFastMutexUnsafeAndLeaveCriticalRegion");
318 
319  pExiAcquireFastMutex = KmtGetSystemRoutineAddress(L"ExiAcquireFastMutex");
320  pExiReleaseFastMutex = KmtGetSystemRoutineAddress(L"ExiReleaseFastMutex");
321  pExiTryToAcquireFastMutex = KmtGetSystemRoutineAddress(L"ExiTryToAcquireFastMutex");
322 
323  memset(&Mutex, 0x55, sizeof Mutex);
325  CheckMutex(&Mutex, 1L, NULL, 0LU, 0x55555555LU, PASSIVE_LEVEL);
326 
330  if (!KmtIsCheckedBuild)
331  {
336  }
338 
340 }
static VOID TestFastMutexConcurrent(PFAST_MUTEX Mutex)
Definition: ExFastMutex.c:247
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
_Out_ PKIRQL Irql
Definition: csq.h:179
Definition: Mutex.h:15
UCHAR KIRQL
Definition: env_spec_w32.h:591
BOOLEAN KmtIsCheckedBuild
smooth NULL
Definition: ftsmooth.c:416
FAST_MUTEX
Definition: extypes.h:17
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
PVOID KmtGetSystemRoutineAddress(IN PCWSTR RoutineName)
static const WCHAR L[]
Definition: oid.c:1250
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
static PFAST_MUTEX Mutex
Definition: timer.c:22
#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, ExpectedContention, ExpectedOldIrql, ExpectedIrql)
Definition: ExFastMutex.c:31
#define memset(x, y, z)
Definition: compat.h:39
static VOID TestFastMutex(PFAST_MUTEX Mutex, KIRQL OriginalIrql)
Definition: ExFastMutex.c:45
#define APC_LEVEL
Definition: env_spec_w32.h:695

◆ StartThread()

static NTSTATUS StartThread ( PTHREAD_DATA  ThreadData,
PLARGE_INTEGER  Timeout,
KIRQL  Irql,
BOOLEAN  Try,
BOOLEAN  RetExpected 
)
static

Definition at line 205 of file ExFastMutex.c.

211 {
214 
215  ThreadData->Try = Try;
216  ThreadData->Irql = Irql;
217  ThreadData->RetExpected = RetExpected;
223 
225 }
#define GENERIC_ALL
Definition: nt_native.h:92
LONG NTSTATUS
Definition: precomp.h:26
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
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Out_ PKIRQL Irql
Definition: csq.h:179
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
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
HANDLE Handle
Definition: drwtsn32.h:25
POBJECT_TYPE PsThreadType
Definition: thread.c:20
Status
Definition: gdiplustypes.h:24
#define SYNCHRONIZE
Definition: nt_native.h:61
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
static ULONG Timeout
Definition: ping.c:61
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
static VOID NTAPI AcquireMutexThread(PVOID Parameter)
Definition: ExFastMutex.c:158
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define ok_eq_hex(value, expected)
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by DbgkpPostFakeThreadMessages(), and TestFastMutexConcurrent().

◆ TestFastMutex()

static VOID TestFastMutex ( PFAST_MUTEX  Mutex,
KIRQL  OriginalIrql 
)
static

Definition at line 45 of file ExFastMutex.c.

48 {
50 
51  ok_irql(OriginalIrql);
52 
53  /* acquire/release normally */
55  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
56  ok_bool_false(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex returned");
57  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
59  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
60 
61  /* ntoskrnl's fastcall version */
62  if (!skip(pExiAcquireFastMutex &&
63  pExiReleaseFastMutex &&
64  pExiTryToAcquireFastMutex, "No fastcall fast mutex functions\n"))
65  {
66  pExiAcquireFastMutex(Mutex);
67  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
68  ok_bool_false(pExiTryToAcquireFastMutex(Mutex), "ExiTryToAcquireFastMutex returned");
69  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
70  pExiReleaseFastMutex(Mutex);
71  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
72  }
73 
74  /* try to acquire */
75  ok_bool_true(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex returned");
76  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
78  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
79 
80  /* shortcut functions with critical region */
81  if (!skip(pExEnterCriticalRegionAndAcquireFastMutexUnsafe &&
82  pExReleaseFastMutexUnsafeAndLeaveCriticalRegion,
83  "Shortcut functions not available"))
84  {
85  pExEnterCriticalRegionAndAcquireFastMutexUnsafe(Mutex);
86  ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned");
87  pExReleaseFastMutexUnsafeAndLeaveCriticalRegion(Mutex);
88  }
89 
90  /* acquire/release unsafe */
91  if (!KmtIsCheckedBuild || OriginalIrql == APC_LEVEL)
92  {
94  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, OriginalIrql);
96  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
97 
98  /* mismatched acquire/release */
100  CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
102  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, APC_LEVEL);
103  KmtSetIrql(OriginalIrql);
104  CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
105 
106  Mutex->OldIrql = 0x55555555LU;
108  CheckMutex(Mutex, 0L, Thread, 0LU, 0x55555555LU, OriginalIrql);
109  Mutex->OldIrql = PASSIVE_LEVEL;
112  KmtSetIrql(OriginalIrql);
113  CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
114  }
115 
116  if (!KmtIsCheckedBuild)
117  {
118  /* release without acquire */
120  CheckMutex(Mutex, 2L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
121  --Mutex->Count;
122  Mutex->OldIrql = OriginalIrql;
124  CheckMutex(Mutex, 2L, NULL, 0LU, OriginalIrql, OriginalIrql);
126  CheckMutex(Mutex, 3L, NULL, 0LU, OriginalIrql, OriginalIrql);
127  Mutex->Count -= 2;
128  }
129 
130  /* make sure we survive this in case of error */
131  ok_eq_long(Mutex->Count, 1L);
132  Mutex->Count = 1;
133  ok_irql(OriginalIrql);
134  KmtSetIrql(OriginalIrql);
135 }
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
Definition: Mutex.h:15
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
#define ok_bool_false(value, desc)
Definition: kmt_test.h:257
BOOLEAN KmtIsCheckedBuild
#define ok_bool_true(value, desc)
Definition: kmt_test.h:256
smooth NULL
Definition: ftsmooth.c:416
VOID KmtSetIrql(IN KIRQL NewIrql)
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:39
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
static const WCHAR L[]
Definition: oid.c:1250
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
BOOLEAN NTAPI KeAreApcsDisabled(VOID)
Definition: apc.c:958
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
#define skip(...)
Definition: atltest.h:64
#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, ExpectedContention, ExpectedOldIrql, ExpectedIrql)
Definition: ExFastMutex.c:31
#define KeGetCurrentThread
Definition: hal.h:44
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define ok_eq_long(value, expected)
Definition: kmt_test.h:240

Referenced by START_TEST().

◆ TestFastMutexConcurrent()

static VOID TestFastMutexConcurrent ( PFAST_MUTEX  Mutex)
static

Definition at line 247 of file ExFastMutex.c.

249 {
252  THREAD_DATA ThreadData2;
253  THREAD_DATA ThreadDataUnsafe;
254  THREAD_DATA ThreadDataTry;
256  Timeout.QuadPart = -50 * MILLISECOND;
257 
262 
263  /* have a thread acquire the mutex */
267  /* have a second thread try to acquire it -- should fail */
268  Status = StartThread(&ThreadDataTry, NULL, PASSIVE_LEVEL, TRUE, FALSE);
271  FinishThread(&ThreadDataTry);
272 
273  /* have another thread acquire it -- should block */
274  Status = StartThread(&ThreadData2, &Timeout, APC_LEVEL, FALSE, FALSE);
277 
278  /* finish the first thread -- now the second should become available */
282  CheckMutex(Mutex, 0L, ThreadData2.Thread, 1LU, APC_LEVEL, PASSIVE_LEVEL);
283 
284  /* block two more threads */
285  Status = StartThread(&ThreadDataUnsafe, &Timeout, APC_LEVEL, FALSE, FALSE);
287  CheckMutex(Mutex, -1L, ThreadData2.Thread, 2LU, APC_LEVEL, PASSIVE_LEVEL);
288 
291  CheckMutex(Mutex, -2L, ThreadData2.Thread, 3LU, APC_LEVEL, PASSIVE_LEVEL);
292 
293  /* finish 1 */
294  FinishThread(&ThreadData2);
297  CheckMutex(Mutex, -1L, ThreadDataUnsafe.Thread, 3LU, APC_LEVEL, PASSIVE_LEVEL);
298 
299  /* finish 2 */
300  FinishThread(&ThreadDataUnsafe);
304 
305  /* finish 3 */
307 
309 }
static NTSTATUS StartThread(PTHREAD_DATA ThreadData, PLARGE_INTEGER Timeout, KIRQL Irql, BOOLEAN Try, BOOLEAN RetExpected)
Definition: ExFastMutex.c:205
#define MILLISECOND
Definition: kmt_test.h:271
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
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
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
Definition: Mutex.h:15
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
PKTHREAD Thread
Definition: ExFastMutex.c:143
static VOID FinishThread(PTHREAD_DATA ThreadData)
Definition: ExFastMutex.c:229
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
#define FALSE
Definition: types.h:117
KEVENT OutEvent
Definition: ExFastMutex.c:152
smooth NULL
Definition: ftsmooth.c:416
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:39
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
static VOID InitThreadData(PTHREAD_DATA ThreadData, PFAST_MUTEX Mutex, PMUTEX_FUNCTION Acquire, PMUTEX_TRY_FUNCTION TryAcquire, PMUTEX_FUNCTION Release)
Definition: ExFastMutex.c:188
static ULONG Timeout
Definition: ping.c:61
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, ExpectedContention, ExpectedOldIrql, ExpectedIrql)
Definition: ExFastMutex.c:31
#define ok_eq_hex(value, expected)
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define APC_LEVEL
Definition: env_spec_w32.h:695

Referenced by START_TEST().

◆ VOID()

static VOID ( FASTCALL pExEnterCriticalRegionAndAcquireFastMutexUnsafe)
static