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)
9 /* INCLUDES *****************************************************************/
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
24 /* PUBLIC FUNCTIONS **********************************************************/
31 ExEnterCriticalRegionAndAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex
)
34 _ExEnterCriticalRegionAndAcquireFastMutexUnsafe(FastMutex
);
42 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(IN OUT PFAST_MUTEX FastMutex
)
45 _ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(FastMutex
);
53 ExAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex
)
56 _ExAcquireFastMutex(FastMutex
);
64 ExReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex
)
67 _ExReleaseFastMutex(FastMutex
);
75 ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex
)
77 /* Acquire the mutex unsafely */
78 _ExAcquireFastMutexUnsafe(FastMutex
);
86 ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex
)
88 /* Release the mutex unsafely */
89 _ExReleaseFastMutexUnsafe(FastMutex
);
97 ExTryToAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex
)
100 return _ExTryToAcquireFastMutex(FastMutex
);