mirror of
https://github.com/reactos/wine.git
synced 2025-02-20 12:50:53 +00:00
kernel32: Implement the InitOnce functions.
This commit is contained in:
parent
fcb3e60332
commit
1992f5005c
@ -745,12 +745,15 @@
|
||||
@ stdcall IdnToNameprepUnicode(long wstr long ptr long)
|
||||
@ stdcall IdnToUnicode(long wstr long ptr long)
|
||||
@ stdcall InitAtomTable(long)
|
||||
@ stdcall InitializeSRWLock(ptr)
|
||||
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
|
||||
@ stdcall InitOnceComplete(ptr long ptr)
|
||||
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
|
||||
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
|
||||
@ stdcall InitializeCriticalSection(ptr)
|
||||
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
|
||||
@ stdcall InitializeCriticalSectionEx(ptr long long)
|
||||
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
|
||||
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
|
||||
@ stdcall InitializeSRWLock(ptr)
|
||||
@ stdcall -arch=i386 InterlockedCompareExchange (ptr long long)
|
||||
@ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr int64 int64) ntdll.RtlInterlockedCompareExchange64
|
||||
@ stdcall -arch=i386 InterlockedDecrement(ptr)
|
||||
|
@ -2237,6 +2237,35 @@ BOOL WINAPI QueryMemoryResourceNotification(HANDLE handle, PBOOL state)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InitOnceBeginInitialize (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI InitOnceBeginInitialize( INIT_ONCE *once, DWORD flags, BOOL *pending, void **context )
|
||||
{
|
||||
NTSTATUS status = RtlRunOnceBeginInitialize( once, flags, context );
|
||||
if (status >= 0) *pending = (status == STATUS_PENDING);
|
||||
else SetLastError( RtlNtStatusToDosError(status) );
|
||||
return status >= 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InitOnceComplete (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI InitOnceComplete( INIT_ONCE *once, DWORD flags, void *context )
|
||||
{
|
||||
NTSTATUS status = RtlRunOnceComplete( once, flags, context );
|
||||
if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) );
|
||||
return !status;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InitOnceExecuteOnce (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI InitOnceExecuteOnce( INIT_ONCE *once, PINIT_ONCE_FN func, void *param, void **context )
|
||||
{
|
||||
return !RtlRunOnceExecuteOnce( once, (PRTL_RUN_ONCE_INIT_FN)func, param, context );
|
||||
}
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1164,7 +1164,7 @@ static void test_initonce(void)
|
||||
|
||||
if (!pInitOnceInitialize || !pInitOnceExecuteOnce)
|
||||
{
|
||||
todo_wine win_skip("one-time initialization API not supported\n");
|
||||
win_skip("one-time initialization API not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user