Copy msimg32
[reactos.git] / reactos / ntoskrnl / rtl / libsupp.c
1 /*
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS system libraries
5 * FILE: lib/ntoskrnl/rtl/libsup.c
6 * PURPOSE: Rtl library support routines
7 * UPDATE HISTORY:
8 *
9 */
10
11 /* INCLUDES ******************************************************************/
12
13 #include <ntoskrnl.h>
14 #define NDEBUG
15 #include <internal/debug.h>
16
17 //FIXME: sort this out somehow
18 #define PCRITICAL_SECTION PVOID
19 #define LPCRITICAL_SECTION PVOID
20
21 /* FUNCTIONS *****************************************************************/
22
23 /*
24 * @implemented
25 */
26 VOID STDCALL
27 RtlDeleteCriticalSection(PCRITICAL_SECTION CriticalSection)
28 {
29 }
30
31 /*
32 * @implemented
33 */
34 DWORD STDCALL
35 RtlSetCriticalSectionSpinCount(
36 LPCRITICAL_SECTION CriticalSection,
37 DWORD SpinCount
38 )
39 {
40 return 0;
41 }
42
43
44 /*
45 * @implemented
46 */
47 VOID STDCALL
48 RtlEnterCriticalSection(PCRITICAL_SECTION CriticalSection)
49 {
50 ExAcquireFastMutex((PFAST_MUTEX) CriticalSection );
51 }
52
53
54 /*
55 * @implemented
56 */
57 NTSTATUS STDCALL
58 RtlInitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
59 {
60 ExInitializeFastMutex((PFAST_MUTEX)CriticalSection );
61 return STATUS_SUCCESS;
62 }
63
64
65 /*
66 * @implemented
67 */
68 VOID STDCALL
69 RtlLeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
70 {
71 ExReleaseFastMutex((PFAST_MUTEX) CriticalSection );
72 }
73
74 /*
75 * @implemented
76 */
77 BOOLEAN STDCALL
78 RtlTryEnterCriticalSection(PCRITICAL_SECTION CriticalSection)
79 {
80 return ExTryToAcquireFastMutex((PFAST_MUTEX) CriticalSection );
81 }
82
83
84 /*
85 * @implemented
86 */
87 NTSTATUS STDCALL
88 RtlInitializeCriticalSectionAndSpinCount (
89 PCRITICAL_SECTION CriticalSection,
90 ULONG SpinCount)
91 {
92 ExInitializeFastMutex((PFAST_MUTEX)CriticalSection );
93 return STATUS_SUCCESS;
94 }
95
96 /* EOF */