[NTOS:MM] Quick fix: use SIZE_T instead of ULONG, because ULONG is 32-bit and on...
[reactos.git] / ntoskrnl / ex / fmutex.c
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
30 FASTCALL
31 ExEnterCriticalRegionAndAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
32 {
33 /* Call the inline */
34 _ExEnterCriticalRegionAndAcquireFastMutexUnsafe(FastMutex);
35 }
36
37 /*
38 * @implemented
39 */
40 VOID
41 FASTCALL
42 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(IN OUT PFAST_MUTEX FastMutex)
43 {
44 /* Call the inline */
45 _ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(FastMutex);
46 }
47
48 /*
49 * @implemented
50 */
51 VOID
52 FASTCALL
53 ExAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex)
54 {
55 /* Call the inline */
56 _ExAcquireFastMutex(FastMutex);
57 }
58
59 /*
60 * @implemented
61 */
62 VOID
63 FASTCALL
64 ExReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex)
65 {
66 /* Call the inline */
67 _ExReleaseFastMutex(FastMutex);
68 }
69
70 /*
71 * @implemented
72 */
73 VOID
74 FASTCALL
75 ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
76 {
77 /* Acquire the mutex unsafely */
78 _ExAcquireFastMutexUnsafe(FastMutex);
79 }
80
81 /*
82 * @implemented
83 */
84 VOID
85 FASTCALL
86 ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
87 {
88 /* Release the mutex unsafely */
89 _ExReleaseFastMutexUnsafe(FastMutex);
90 }
91
92 /*
93 * @implemented
94 */
95 BOOLEAN
96 FASTCALL
97 ExTryToAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex)
98 {
99 /* Call the inline */
100 return _ExTryToAcquireFastMutex(FastMutex);
101 }
102
103 /* EOF */