kernel32: Forward remaining threadpool functions to ntdll.
This commit is contained in:
parent
56b9af1150
commit
eadd27a38a
|
@ -228,7 +228,7 @@
|
|||
# @ stub ClosePrivateNamespace
|
||||
@ stdcall CloseProfileUserMapping()
|
||||
@ stub CloseSystemHandle
|
||||
# @ stub CloseThreadpool
|
||||
@ stdcall CloseThreadpool(ptr) ntdll.TpReleasePool
|
||||
@ stdcall CloseThreadpoolCleanupGroup(ptr) ntdll.TpReleaseCleanupGroup
|
||||
@ stdcall CloseThreadpoolCleanupGroupMembers(ptr long ptr) ntdll.TpReleaseCleanupGroupMembers
|
||||
# @ stub CloseThreadpoolIo
|
||||
|
@ -331,7 +331,7 @@
|
|||
@ stdcall CreateSymbolicLinkW(wstr wstr long)
|
||||
@ stdcall CreateTapePartition(long long long long)
|
||||
@ stdcall CreateThread(ptr long ptr long long ptr)
|
||||
# @ stub CreateThreadpool
|
||||
@ stdcall CreateThreadpool(ptr)
|
||||
@ stdcall CreateThreadpoolCleanupGroup()
|
||||
# @ stub CreateThreadpoolIo
|
||||
@ stdcall CreateThreadpoolTimer(ptr ptr ptr)
|
||||
|
@ -1454,8 +1454,8 @@
|
|||
# @ stub SetThreadToken
|
||||
@ stdcall SetThreadUILanguage(long)
|
||||
# @ stub SetThreadpoolStackInformation
|
||||
# @ stub SetThreadpoolThreadMaximum
|
||||
# @ stub SetThreadpoolThreadMinimum
|
||||
@ stdcall SetThreadpoolThreadMaximum(ptr long) ntdll.TpSetPoolMaxThreads
|
||||
@ stdcall SetThreadpoolThreadMinimum(ptr long) ntdll.TpSetPoolMinThreads
|
||||
@ stdcall SetThreadpoolTimer(ptr ptr long long)
|
||||
# @ stub SetThreadpoolWait
|
||||
@ stdcall SetTimeZoneInformation(ptr)
|
||||
|
@ -1509,7 +1509,7 @@
|
|||
@ stdcall TryAcquireSRWLockExclusive(ptr) ntdll.RtlTryAcquireSRWLockExclusive
|
||||
@ stdcall TryAcquireSRWLockShared(ptr) ntdll.RtlTryAcquireSRWLockShared
|
||||
@ stdcall TryEnterCriticalSection(ptr) ntdll.RtlTryEnterCriticalSection
|
||||
# @ stub TrySubmitThreadpoolCallback
|
||||
@ stdcall TrySubmitThreadpoolCallback(ptr ptr ptr)
|
||||
@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)
|
||||
# @ stub TzSpecificLocalTimeToSystemTimeEx
|
||||
# @ stub -arch=x86_64 uaw_lstrcmpW
|
||||
|
|
|
@ -1627,8 +1627,8 @@ static void test_threadpool(void)
|
|||
int workcalled = 0;
|
||||
|
||||
if (!pCreateThreadpool) {
|
||||
todo_wine win_skip("thread pool apis not supported.\n");
|
||||
return;
|
||||
win_skip("thread pool apis not supported.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
work = pCreateThreadpoolWork(threadpool_workcallback, &workcalled, NULL);
|
||||
|
@ -1640,7 +1640,7 @@ static void test_threadpool(void)
|
|||
ok (workcalled == 1, "expected work to be called once, got %d\n", workcalled);
|
||||
|
||||
pool = pCreateThreadpool(NULL);
|
||||
todo_wine ok (pool != NULL, "CreateThreadpool failed\n");
|
||||
ok (pool != NULL, "CreateThreadpool failed\n");
|
||||
}
|
||||
|
||||
static void test_reserved_tls(void)
|
||||
|
|
|
@ -880,6 +880,26 @@ BOOL WINAPI CallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CreateThreadpool (KERNEL32.@)
|
||||
*/
|
||||
PTP_POOL WINAPI CreateThreadpool( PVOID reserved )
|
||||
{
|
||||
TP_POOL *pool;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "%p\n", reserved );
|
||||
|
||||
status = TpAllocPool( &pool, reserved );
|
||||
if (status)
|
||||
{
|
||||
SetLastError( RtlNtStatusToDosError(status) );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pool;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CreateThreadpoolCleanupGroup (KERNEL32.@)
|
||||
*/
|
||||
|
@ -960,3 +980,23 @@ VOID WINAPI SetThreadpoolTimer( TP_TIMER *timer, FILETIME *due_time,
|
|||
|
||||
TpSetTimer( timer, due_time ? &timeout : NULL, period, window_length );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TrySubmitThreadpoolCallback (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI TrySubmitThreadpoolCallback( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
|
||||
TP_CALLBACK_ENVIRON *environment )
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "%p, %p, %p\n", callback, userdata, environment );
|
||||
|
||||
status = TpSimpleTryPost( callback, userdata, environment );
|
||||
if (status)
|
||||
{
|
||||
SetLastError( RtlNtStatusToDosError(status) );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -2619,6 +2619,7 @@ NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PC
|
|||
/* Threadpool functions */
|
||||
|
||||
NTSYSAPI NTSTATUS WINAPI TpAllocCleanupGroup(TP_CLEANUP_GROUP **);
|
||||
NTSYSAPI NTSTATUS WINAPI TpAllocPool(TP_POOL **,PVOID);
|
||||
NTSYSAPI NTSTATUS WINAPI TpAllocTimer(TP_TIMER **,PTP_TIMER_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
|
||||
NTSYSAPI NTSTATUS WINAPI TpAllocWork(TP_WORK **,PTP_WORK_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
|
||||
NTSYSAPI void WINAPI TpCallbackLeaveCriticalSectionOnCompletion(TP_CALLBACK_INSTANCE *,RTL_CRITICAL_SECTION *);
|
||||
|
@ -2632,9 +2633,13 @@ NTSYSAPI BOOL WINAPI TpIsTimerSet(TP_TIMER *);
|
|||
NTSYSAPI void WINAPI TpPostWork(TP_WORK *);
|
||||
NTSYSAPI void WINAPI TpReleaseCleanupGroup(TP_CLEANUP_GROUP *);
|
||||
NTSYSAPI void WINAPI TpReleaseCleanupGroupMembers(TP_CLEANUP_GROUP *,BOOL,PVOID);
|
||||
NTSYSAPI void WINAPI TpReleasePool(TP_POOL *);
|
||||
NTSYSAPI void WINAPI TpReleaseTimer(TP_TIMER *);
|
||||
NTSYSAPI void WINAPI TpReleaseWork(TP_WORK *);
|
||||
NTSYSAPI void WINAPI TpSetPoolMaxThreads(TP_POOL *,DWORD);
|
||||
NTSYSAPI BOOL WINAPI TpSetPoolMinThreads(TP_POOL *,DWORD);
|
||||
NTSYSAPI void WINAPI TpSetTimer(TP_TIMER *, LARGE_INTEGER *,LONG,LONG);
|
||||
NTSYSAPI NTSTATUS WINAPI TpSimpleTryPost(PTP_SIMPLE_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
|
||||
NTSYSAPI void WINAPI TpWaitForTimer(TP_TIMER *,BOOL);
|
||||
NTSYSAPI void WINAPI TpWaitForWork(TP_WORK *,BOOL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue