mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[KERNEL32_VISTA][SDK] Move SRW definitions to NDK (#6806)
Move SRW and condition variable definitions out of kernel32_vista and into the NDK. Essentially grabbed from PR #1190 Trying to reduce diff needed for Rtl/ntdll sync.
This commit is contained in:
parent
4fe33fe9d5
commit
bc6c731db3
4 changed files with 55 additions and 48 deletions
|
@ -3,52 +3,6 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlInitializeConditionVariable(OUT PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlWakeConditionVariable(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlWakeAllConditionVariable(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSleepConditionVariableCS(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
IN OUT PRTL_CRITICAL_SECTION CriticalSection,
|
||||
IN PLARGE_INTEGER TimeOut OPTIONAL);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSleepConditionVariableSRW(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
IN OUT PRTL_SRWLOCK SRWLock,
|
||||
IN PLARGE_INTEGER TimeOut OPTIONAL,
|
||||
IN ULONG Flags);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlInitializeSRWLock(OUT PRTL_SRWLOCK SRWLock);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlReleaseSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlAcquireSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RtlReleaseSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock);
|
||||
|
||||
|
||||
VOID
|
||||
WINAPI
|
||||
AcquireSRWLockExclusive(PSRWLOCK Lock)
|
||||
|
|
|
@ -4693,6 +4693,46 @@ BOOLEAN
|
|||
NTAPI
|
||||
RtlGetNtProductType(_Out_ PNT_PRODUCT_TYPE ProductType);
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
||||
//
|
||||
// Synchronization functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlInitializeConditionVariable(
|
||||
_Out_ PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlWakeConditionVariable(
|
||||
_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlWakeAllConditionVariable(
|
||||
_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSleepConditionVariableCS(
|
||||
_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
_Inout_ PRTL_CRITICAL_SECTION CriticalSection,
|
||||
_In_opt_ PLARGE_INTEGER TimeOut);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSleepConditionVariableSRW(
|
||||
_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
_Inout_ PRTL_SRWLOCK SRWLock,
|
||||
_In_opt_ PLARGE_INTEGER TimeOut,
|
||||
_In_ ULONG Flags);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Secure Memory Functions
|
||||
//
|
||||
|
|
|
@ -279,6 +279,19 @@ typedef struct _OSVERSIONINFOEXW {
|
|||
UCHAR wReserved;
|
||||
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
|
||||
|
||||
#define RTL_CONDITION_VARIABLE_INIT {0}
|
||||
#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 0x1
|
||||
|
||||
typedef struct _RTL_CONDITION_VARIABLE {
|
||||
PVOID Ptr;
|
||||
} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE;
|
||||
|
||||
#define RTL_SRWLOCK_INIT {0}
|
||||
|
||||
typedef struct _RTL_SRWLOCK {
|
||||
PVOID Ptr;
|
||||
} RTL_SRWLOCK, *PRTL_SRWLOCK;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef OSVERSIONINFOEXW OSVERSIONINFOEX;
|
||||
typedef POSVERSIONINFOEXW POSVERSIONINFOEX;
|
||||
|
|
|
@ -499,7 +499,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
RtlSleepConditionVariableCS(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
IN OUT PRTL_CRITICAL_SECTION CriticalSection,
|
||||
IN const LARGE_INTEGER * TimeOut OPTIONAL)
|
||||
IN PLARGE_INTEGER TimeOut OPTIONAL)
|
||||
{
|
||||
return InternalSleep(ConditionVariable,
|
||||
CriticalSection,
|
||||
|
@ -512,7 +512,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
RtlSleepConditionVariableSRW(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable,
|
||||
IN OUT PRTL_SRWLOCK SRWLock,
|
||||
IN const LARGE_INTEGER * TimeOut OPTIONAL,
|
||||
IN PLARGE_INTEGER TimeOut OPTIONAL,
|
||||
IN ULONG Flags)
|
||||
{
|
||||
return InternalSleep(ConditionVariable,
|
||||
|
|
Loading…
Reference in a new issue