48{
50
51 ok_irql(OriginalIrql);
52
53
60
61
62 if (!
skip(pExiAcquireFastMutex &&
63 pExiReleaseFastMutex &&
64 pExiTryToAcquireFastMutex, "No fastcall fast mutex functions\n"))
65 {
66 pExiAcquireFastMutex(
Mutex);
70 pExiReleaseFastMutex(
Mutex);
72 }
73
74
79
80
81 if (!
skip(pExEnterCriticalRegionAndAcquireFastMutexUnsafe &&
82 pExReleaseFastMutexUnsafeAndLeaveCriticalRegion,
83 "Shortcut functions not available"))
84 {
85 pExEnterCriticalRegionAndAcquireFastMutexUnsafe(
Mutex);
87 pExReleaseFastMutexUnsafeAndLeaveCriticalRegion(
Mutex);
88 }
89
90
92 {
97
98
105
106 Mutex->OldIrql = 0x55555555LU;
114 }
115
117 {
118
122 Mutex->OldIrql = OriginalIrql;
128 }
129
130
133 ok_irql(OriginalIrql);
135}
#define ok_eq_long(value, expected)
#define ok_bool_true(value, desc)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
#define KeGetCurrentThread
VOID KmtSetIrql(IN KIRQL NewIrql)
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)