ReactOS  r75385
gmutex.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: ntoskrnl/ke/gmutex.c
5  * PURPOSE: Implements Guarded Mutex
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  * Filip Navara (navaraf@reactos.org)
8  */
9 
10 /* INCLUDES ******************************************************************/
11 
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* Undefine some macros we implement here */
17 #undef KeInitializeGuardedMutex
18 #undef KeAcquireGuardedMutex
19 #undef KeReleaseGuardedMutex
20 #undef KeAcquireGuardedMutexUnsafe
21 #undef KeReleaseGuardedMutexUnsafe
22 #undef KeTryToAcquireGuardedMutex
23 
24 /* PUBLIC FUNCTIONS **********************************************************/
25 
26 /*
27  * @implemented
28  */
29 VOID
32 {
33  /* Call the inline */
34  _KeInitializeGuardedMutex(GuardedMutex);
35 }
36 
37 /*
38  * @implemented
39  */
40 VOID
43 {
44  /* Call the inline */
45  _KeAcquireGuardedMutex(GuardedMutex);
46 }
47 
48 /*
49  * @implemented
50  */
51 VOID
54 {
55  /* Call the inline */
56  _KeReleaseGuardedMutex(GuardedMutex);
57 }
58 
59 /*
60  * @implemented
61  */
62 VOID
65 {
66  /* Call the inline */
67  _KeAcquireGuardedMutexUnsafe(GuardedMutex);
68 }
69 
70 /*
71  * @implemented
72  */
73 VOID
76 {
77  /* Call the inline */
78  _KeReleaseGuardedMutexUnsafe(GuardedMutex);
79 }
80 
81 /*
82  * @implemented
83  */
84 BOOLEAN
87 {
88  /* Call the inline */
89  return _KeTryToAcquireGuardedMutex(GuardedMutex);
90 }
91 
98 VOID
99 NTAPI
101 {
102  /* Use the inlined version */
104 }
105 
111 VOID
112 NTAPI
114 {
115  /* Use the inlined version */
117 }
118 
119 /* EOF */
#define IN
Definition: typedefs.h:39
FORCEINLINE VOID _KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1573
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:42
VOID NTAPI _KeLeaveGuardedRegion(VOID)
Definition: gmutex.c:113
#define FASTCALL
Definition: nt_native.h:50
VOID NTAPI _KeEnterGuardedRegion(VOID)
Definition: gmutex.c:100
FORCEINLINE VOID _KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1532
FORCEINLINE VOID _KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1495
FORCEINLINE VOID _KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1598
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define KeLeaveGuardedRegion()
Definition: ke_x.h:63
unsigned char BOOLEAN
#define KeEnterGuardedRegion()
Definition: ke_x.h:34
VOID FASTCALL KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:75
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:31
BOOLEAN FASTCALL KeTryToAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:86
FORCEINLINE BOOLEAN _KeTryToAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1641
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:53
FORCEINLINE VOID _KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1508
#define OUT
Definition: typedefs.h:40
VOID FASTCALL KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:64