[KERNEL32_VISTA][SDK] Import Threadpool.c from wine-9.7

This commit is contained in:
Denis Malikov 2024-04-25 21:08:41 -07:00 committed by Justin Miller
parent d92f02e2e5
commit 405ed2b4ce
7 changed files with 3444 additions and 2 deletions

View file

@ -4745,6 +4745,54 @@ RtlSleepConditionVariableSRW(
_In_ ULONG Flags);
#endif
//
// Synchronization functions
//
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 const 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);
//
// Secure Memory Functions
//

View file

@ -4123,6 +4123,7 @@ InitOnceExecuteOnce(
_Inout_opt_ PVOID Parameter,
_Outptr_opt_result_maybenull_ LPVOID *Context);
typedef VOID (NTAPI *PTP_WIN32_IO_CALLBACK)(PTP_CALLBACK_INSTANCE,PVOID,PVOID,ULONG,ULONG_PTR,PTP_IO);
#if defined(_SLIST_HEADER_) && !defined(_NTOS_) && !defined(_NTOSP_)

View file

@ -4480,7 +4480,11 @@ DbgRaiseAssertionFailure(VOID)
typedef struct _TP_POOL TP_POOL, *PTP_POOL;
typedef struct _TP_WORK TP_WORK, *PTP_WORK;
typedef struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE, *PTP_CALLBACK_INSTANCE;
typedef struct _TP_TIMER TP_TIMER, *PTP_TIMER;
typedef struct _TP_WAIT TP_WAIT, *PTP_WAIT;
typedef struct _TP_IO TP_IO, *PTP_IO;
typedef DWORD TP_WAIT_RESULT;
typedef DWORD TP_VERSION, *PTP_VERSION;
typedef enum _TP_CALLBACK_PRIORITY {
@ -4509,6 +4513,9 @@ typedef VOID
_Inout_opt_ PVOID ObjectContext,
_Inout_opt_ PVOID CleanupContext);
typedef VOID (NTAPI *PTP_TIMER_CALLBACK)(PTP_CALLBACK_INSTANCE,PVOID,PTP_TIMER);
typedef VOID (NTAPI *PTP_WAIT_CALLBACK)(PTP_CALLBACK_INSTANCE,PVOID,PTP_WAIT,TP_WAIT_RESULT);
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
typedef struct _TP_CALLBACK_ENVIRON_V3 {
TP_VERSION Version;

View file

@ -127,6 +127,7 @@ list(APPEND SOURCE_VISTA
condvar.c
runonce.c
srw.c
threadpool.c
utf8.c)
add_library(rtl_vista ${SOURCE_VISTA})

3357
sdk/lib/rtl/threadpool.c Normal file

File diff suppressed because it is too large Load diff