ReactOS  0.4.14-dev-390-g34947ad
fmutex.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel
4  * FILE: ntoskrnl/ex/fmutex.c
5  * PURPOSE: Implements fast mutexes
6  * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
7  */
8 
9 /* INCLUDES *****************************************************************/
10 
11 #include <ntoskrnl.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 /* Undefine some macros we implement here */
16 #undef ExEnterCriticalRegionAndAcquireFastMutexUnsafe
17 #undef ExReleaseFastMutexUnsafeAndLeaveCriticalRegion
18 #undef ExAcquireFastMutex
19 #undef ExReleaseFastMutex
20 #undef ExAcquireFastMutexUnsafe
21 #undef ExReleaseFastMutexUnsafe
22 #undef ExTryToAcquireFastMutex
23 
24 /* PUBLIC FUNCTIONS **********************************************************/
25 
26 /*
27  * @implemented
28  */
29 VOID
32 {
33  /* Call the inline */
35 }
36 
37 /*
38  * @implemented
39  */
40 VOID
43 {
44  /* Call the inline */
46 }
47 
48 /*
49  * @implemented
50  */
51 VOID
54 {
55  /* Call the inline */
56  _ExAcquireFastMutex(FastMutex);
57 }
58 
59 /*
60  * @implemented
61  */
62 VOID
65 {
66  /* Call the inline */
67  _ExReleaseFastMutex(FastMutex);
68 }
69 
70 /*
71  * @implemented
72  */
73 VOID
76 {
77  /* Acquire the mutex unsafely */
78  _ExAcquireFastMutexUnsafe(FastMutex);
79 }
80 
81 /*
82  * @implemented
83  */
84 VOID
87 {
88  /* Release the mutex unsafely */
89  _ExReleaseFastMutexUnsafe(FastMutex);
90 }
91 
92 /*
93  * @implemented
94  */
95 BOOLEAN
98 {
99  /* Call the inline */
100  return _ExTryToAcquireFastMutex(FastMutex);
101 }
102 
103 /* EOF */
VOID FASTCALL ExEnterCriticalRegionAndAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
#define IN
Definition: typedefs.h:38
VOID FASTCALL ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:42
FORCEINLINE VOID _ExReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex)
Definition: ex.h:1383
#define FASTCALL
Definition: nt_native.h:50
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
unsigned char BOOLEAN
FORCEINLINE VOID _ExEnterCriticalRegionAndAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: ex.h:1432
FORCEINLINE VOID _ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(IN OUT PFAST_MUTEX FastMutex)
Definition: ex.h:1443
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:39
* PFAST_MUTEX
Definition: extypes.h:17
FORCEINLINE VOID _ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: ex.h:1361
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
FORCEINLINE BOOLEAN _ExTryToAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex)
Definition: ex.h:1405
#define OUT
Definition: typedefs.h:39
FORCEINLINE VOID _ExAcquireFastMutexUnsafe(IN PFAST_MUTEX FastMutex)
Definition: ex.h:1316
FORCEINLINE VOID _ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: ex.h:1340