ReactOS  0.4.14-dev-608-gd495a4f
sync.c
Go to the documentation of this file.
1 #include "k32_vista.h"
2 
3 #define NDEBUG
4 #include <debug.h>
5 
6 VOID
7 NTAPI
9 
10 VOID
11 NTAPI
13 
14 VOID
15 NTAPI
17 
19 NTAPI
22  IN PLARGE_INTEGER TimeOut OPTIONAL);
23 
25 NTAPI
27  IN OUT PRTL_SRWLOCK SRWLock,
28  IN PLARGE_INTEGER TimeOut OPTIONAL,
29  IN ULONG Flags);
30 
31 VOID
32 NTAPI
34 
35 VOID
36 NTAPI
38 
39 VOID
40 NTAPI
42 
43 VOID
44 NTAPI
46 
47 VOID
48 NTAPI
50 
51 
52 VOID
53 WINAPI
55 {
57 }
58 
59 VOID
60 WINAPI
62 {
64 }
65 
66 VOID
67 WINAPI
68 InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
69 {
71 }
72 
73 VOID
74 WINAPI
76 {
78 }
79 
80 VOID
81 WINAPI
83 {
85 }
86 
87 VOID
88 WINAPI
90 {
92 }
93 
97 {
98  if (Timeout == INFINITE) return NULL;
99  Time->QuadPart = (ULONGLONG)Timeout * -10000;
100  return Time;
101 }
102 
103 BOOL
104 WINAPI
106 {
109 
112  {
114  return FALSE;
115  }
116  return TRUE;
117 }
118 
119 BOOL
120 WINAPI
121 SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK Lock, DWORD Timeout, ULONG Flags)
122 {
125 
128  {
130  return FALSE;
131  }
132  return TRUE;
133 }
134 
135 VOID
136 WINAPI
137 WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable)
138 {
140 }
141 
142 VOID
143 WINAPI
144 WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
145 {
147 }
148 
149 
150 /*
151 * @implemented
152 */
154  IN DWORD dwSpinCount,
155  IN DWORD flags)
156 {
158 
159  /* FIXME: Flags ignored */
160 
161  /* Initialize the critical section */
163  (PRTL_CRITICAL_SECTION)lpCriticalSection,
164  dwSpinCount);
165  if (!NT_SUCCESS(Status))
166  {
167  /* Set failure code */
169  return FALSE;
170  }
171 
172  /* Success */
173  return TRUE;
174 }
175 
NTSTATUS NTAPI RtlSleepConditionVariableSRW(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable, IN OUT PRTL_SRWLOCK SRWLock, IN PLARGE_INTEGER TimeOut OPTIONAL, IN ULONG Flags)
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK Lock)
Definition: sync.c:54
#define IN
Definition: typedefs.h:38
#define TRUE
Definition: types.h:120
VOID NTAPI RtlWakeAllConditionVariable(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable)
Definition: condvar.c:491
VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
Definition: sync.c:144
LONG NTSTATUS
Definition: precomp.h:26
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSectionAndSpinCount(_In_ PRTL_CRITICAL_SECTION CriticalSection, _In_ ULONG SpinCount)
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable)
Definition: sync.c:137
unsigned int BOOL
Definition: ntddk_ex.h:94
CRITICAL_SECTION CriticalSection
Definition: iprtprio.c:40
VOID NTAPI RtlAcquireSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock)
Definition: srw.c:589
static PSRWLOCK
Definition: sync.c:52
NTSTATUS NTAPI RtlSleepConditionVariableCS(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable, IN OUT PRTL_CRITICAL_SECTION CriticalSection, IN PLARGE_INTEGER TimeOut OPTIONAL)
smooth NULL
Definition: ftsmooth.c:416
#define FORCEINLINE
Definition: ntbasedef.h:221
BOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK Lock, DWORD Timeout, ULONG Flags)
Definition: sync.c:121
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
uint64_t ULONGLONG
Definition: typedefs.h:65
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID NTAPI RtlReleaseSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock)
Definition: srw.c:524
#define SetLastError(x)
Definition: compat.h:417
GLbitfield flags
Definition: glext.h:7161
FORCEINLINE PLARGE_INTEGER GetNtTimeout(PLARGE_INTEGER Time, DWORD Timeout)
Definition: sync.c:96
VOID NTAPI RtlReleaseSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock)
Definition: srw.c:708
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
Definition: sync.c:82
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
VOID WINAPI InitializeSRWLock(PSRWLOCK Lock)
Definition: sync.c:75
Status
Definition: gdiplustypes.h:24
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:153
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
VOID NTAPI RtlInitializeSRWLock(OUT PRTL_SRWLOCK SRWLock)
Definition: srw.c:315
static ULONG Timeout
Definition: ping.c:61
BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD Timeout)
Definition: sync.c:105
VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
Definition: sync.c:68
VOID NTAPI RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock)
Definition: srw.c:323
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
#define INFINITE
Definition: serial.h:102
VOID NTAPI RtlInitializeConditionVariable(OUT PRTL_CONDITION_VARIABLE ConditionVariable)
Definition: condvar.c:477
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
Definition: sync.c:61
static PLARGE_INTEGER Time
Definition: time.c:105
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)
Definition: sync.c:89
LONGLONG QuadPart
Definition: typedefs.h:112
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
VOID NTAPI RtlWakeConditionVariable(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable)
Definition: condvar.c:484