ReactOS 0.4.16-dev-311-g9382aa2
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 */
29VOID
32{
33 /* Call the inline */
34 _KeInitializeGuardedMutex(GuardedMutex);
35}
36
37/*
38 * @implemented
39 */
40VOID
43{
44 /* Call the inline */
45 _KeAcquireGuardedMutex(GuardedMutex);
46}
47
48/*
49 * @implemented
50 */
51VOID
54{
55 /* Call the inline */
56 _KeReleaseGuardedMutex(GuardedMutex);
57}
58
59/*
60 * @implemented
61 */
62VOID
65{
66 /* Call the inline */
67 _KeAcquireGuardedMutexUnsafe(GuardedMutex);
68}
69
70/*
71 * @implemented
72 */
73VOID
76{
77 /* Call the inline */
78 _KeReleaseGuardedMutexUnsafe(GuardedMutex);
79}
80
81/*
82 * @implemented
83 */
87{
88 /* Call the inline */
89 return _KeTryToAcquireGuardedMutex(GuardedMutex);
90}
91
98VOID
101{
102 /* Use the inlined version */
104}
105
111VOID
112NTAPI
114{
115 /* Use the inlined version */
117}
118
119/* EOF */
unsigned char BOOLEAN
VOID FASTCALL KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:75
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:31
VOID NTAPI _KeEnterGuardedRegion(VOID)
Definition: gmutex.c:100
VOID NTAPI _KeLeaveGuardedRegion(VOID)
Definition: gmutex.c:113
VOID FASTCALL KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:64
BOOLEAN FASTCALL KeTryToAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:86
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:53
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:42
FORCEINLINE VOID _KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1522
FORCEINLINE VOID _KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1546
#define KeLeaveGuardedRegion()
Definition: ke_x.h:68
FORCEINLINE BOOLEAN _KeTryToAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1655
FORCEINLINE VOID _KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1587
FORCEINLINE VOID _KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1509
FORCEINLINE VOID _KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1612
#define KeEnterGuardedRegion()
Definition: ke_x.h:39
#define FASTCALL
Definition: nt_native.h:50
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40