Skip to content

Commit

Permalink
[KERNEL32][ROSTESTS][SDK] Enable threadpooling
Browse files Browse the repository at this point in the history
[NTDLL] Init KeyedEvents even on NT5.2 dll_export
[MEDIA] Update winesync.txt accordingly
[SDK][DLL] Initialize crtical sections at runtime
  • Loading branch information
DarkFire01 committed Dec 5, 2024
1 parent 2130623 commit a1c1e9f
Show file tree
Hide file tree
Showing 17 changed files with 1,119 additions and 2,108 deletions.
68 changes: 35 additions & 33 deletions dll/ntdll/def/ntdll.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1311,45 +1311,47 @@
@ stub -version=0x600+ ShipAssertMsgA
@ stub -version=0x600+ ShipAssertMsgW
@ stub -version=0x600+ TpAllocAlpcCompletion
@ stub -version=0x600+ TpAllocCleanupGroup
@ stub -version=0x600+ TpAllocIoCompletion
@ stub -version=0x600+ TpAllocPool
@ stub -version=0x600+ TpAllocTimer
@ stub -version=0x600+ TpAllocWait
@ stub -version=0x600+ TpAllocWork
@ stub -version=0x600+ TpCallbackLeaveCriticalSectionOnCompletion
@ stub -version=0x600+ TpCallbackMayRunLong
@ stub -version=0x600+ TpCallbackReleaseMutexOnCompletion
@ stub -version=0x600+ TpCallbackReleaseSemaphoreOnCompletion
@ stub -version=0x600+ TpCallbackSetEventOnCompletion
@ stub -version=0x600+ TpCallbackUnloadDllOnCompletion
@ stub -version=0x600+ TpCancelAsyncIoOperation
@ stdcall -version=0x600+ TpAllocCleanupGroup(ptr)
@ stdcall -version=0x600+ TpAllocIoCompletion(ptr ptr ptr ptr ptr)
@ stdcall -version=0x600+ TpAllocPool(ptr ptr)
@ stdcall -version=0x600+ TpAllocTimer(ptr ptr ptr ptr)
@ stdcall -version=0x600+ TpAllocWait(ptr ptr ptr ptr)
@ stdcall -version=0x600+ TpAllocWork(ptr ptr ptr ptr)
@ stdcall -version=0x600+ TpCallbackLeaveCriticalSectionOnCompletion(ptr ptr)
@ stdcall -version=0x600+ TpCallbackMayRunLong(ptr)
@ stdcall -version=0x600+ TpCallbackReleaseMutexOnCompletion(ptr ptr)
@ stdcall -version=0x600+ TpCallbackReleaseSemaphoreOnCompletion(ptr ptr long)
@ stdcall -version=0x600+ TpCallbackSetEventOnCompletion(ptr ptr)
@ stdcall -version=0x600+ TpCallbackUnloadDllOnCompletion(ptr ptr)
@ stdcall -version=0x600+ TpCancelAsyncIoOperation(ptr)
@ stub -version=0x600+ TpCaptureCaller
@ stub -version=0x600+ TpCheckTerminateWorker
@ stub -version=0x600+ TpDbgDumpHeapUsage
@ stub -version=0x600+ TpDbgSetLogRoutine
@ stub -version=0x600+ TpDisassociateCallback
@ stub -version=0x600+ TpIsTimerSet
@ stub -version=0x600+ TpPostWork
@ stdcall -version=0x600+ TpDisassociateCallback(ptr)
@ stdcall -version=0x600+ TpIsTimerSet(ptr)
@ stdcall -version=0x600+ TpPostWork(ptr)
@ stdcall -version=0x600+ TpQueryPoolStackInformation(ptr ptr)
@ stub -version=0x600+ TpReleaseAlpcCompletion
@ stub -version=0x600+ TpReleaseCleanupGroup
@ stub -version=0x600+ TpReleaseCleanupGroupMembers
@ stub -version=0x600+ TpReleaseIoCompletion
@ stub -version=0x600+ TpReleasePool
@ stub -version=0x600+ TpReleaseTimer
@ stub -version=0x600+ TpReleaseWait
@ stub -version=0x600+ TpReleaseWork
@ stub -version=0x600+ TpSetPoolMaxThreads
@ stub -version=0x600+ TpSetPoolMinThreads
@ stub -version=0x600+ TpSetTimer
@ stub -version=0x600+ TpSetWait
@ stub -version=0x600+ TpSimpleTryPost
@ stub -version=0x600+ TpStartAsyncIoOperation
@ stdcall -version=0x600+ TpReleaseCleanupGroup(ptr)
@ stdcall -version=0x600+ TpReleaseCleanupGroupMembers(ptr long ptr)
@ stdcall -version=0x600+ TpReleaseIoCompletion(ptr)
@ stdcall -version=0x600+ TpReleasePool(ptr)
@ stdcall -version=0x600+ TpReleaseTimer(ptr)
@ stdcall -version=0x600+ TpReleaseWait(ptr)
@ stdcall -version=0x600+ TpReleaseWork(ptr)
@ stdcall -version=0x600+ TpSetPoolMaxThreads(ptr long)
@ stdcall -version=0x600+ TpSetPoolMinThreads(ptr long)
@ stdcall -version=0x600+ TpSetPoolStackInformation(ptr ptr)
@ stdcall -version=0x600+ TpSetTimer(ptr ptr long long)
@ stdcall -version=0x600+ TpSetWait(ptr long ptr)
@ stdcall -version=0x600+ TpSimpleTryPost(ptr ptr ptr)
@ stdcall -version=0x600+ TpStartAsyncIoOperation(ptr)
@ stub -version=0x600+ TpWaitForAlpcCompletion
@ stub -version=0x600+ TpWaitForIoCompletion
@ stub -version=0x600+ TpWaitForTimer
@ stub -version=0x600+ TpWaitForWait
@ stub -version=0x600+ TpWaitForWork
@ stdcall -version=0x600+ TpWaitForIoCompletion(ptr long)
@ stdcall -version=0x600+ TpWaitForTimer(ptr long)
@ stdcall -version=0x600+ TpWaitForWait(ptr long)
@ stdcall -version=0x600+ TpWaitForWork(ptr long)
@ stdcall -ret64 VerSetConditionMask(double long long)
@ stub -version=0x600+ WerCheckEventEscalation
@ stub -version=0x600+ WerReportSQMEvent
Expand Down
5 changes: 5 additions & 0 deletions dll/ntdll/include/ntdllp.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,9 @@ NTAPI
RtlpInitializeKeyedEvent(
VOID);

VOID
NTAPI
RtlpInitializeThreadPooling(
VOID);

/* EOF */
4 changes: 2 additions & 2 deletions dll/ntdll/ldr/ldrinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,10 +2405,10 @@ LdrpInitializeProcess(IN PCONTEXT Context,
/* Check whether all static imports were properly loaded and return here */
if (!NT_SUCCESS(ImportStatus)) return ImportStatus;

#if (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA)
/* Following two calls are for Vista+ support, required for winesync */
/* Initialize the keyed event for condition variables */
RtlpInitializeKeyedEvent();
#endif
RtlpInitializeThreadPooling();

/* Initialize TLS */
Status = LdrpInitializeTls();
Expand Down
29 changes: 0 additions & 29 deletions dll/ntdll/nt_0600/ntdll_vista.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,5 @@
@ stdcall RtlRunOnceComplete(ptr long ptr)
@ stdcall RtlRunOnceExecuteOnce(ptr ptr ptr ptr)

@ stdcall TpAllocCleanupGroup(ptr)
@ stdcall TpAllocPool(ptr ptr)
@ stdcall TpAllocTimer(ptr ptr ptr ptr)
@ stdcall TpAllocWait(ptr ptr ptr ptr)
@ stdcall TpAllocWork(ptr ptr ptr ptr)
@ stdcall TpCallbackLeaveCriticalSectionOnCompletion(ptr ptr)
@ stdcall TpCallbackMayRunLong(ptr)
@ stdcall TpCallbackReleaseMutexOnCompletion(ptr ptr)
@ stdcall TpCallbackReleaseSemaphoreOnCompletion(ptr ptr long)
@ stdcall TpCallbackSetEventOnCompletion(ptr ptr)
@ stdcall TpCallbackUnloadDllOnCompletion(ptr ptr)
@ stdcall TpDisassociateCallback(ptr)
@ stdcall TpIsTimerSet(ptr)
@ stdcall TpPostWork(ptr)
@ stdcall TpReleaseCleanupGroup(ptr)
@ stdcall TpReleaseCleanupGroupMembers(ptr long ptr)
@ stdcall TpReleasePool(ptr)
@ stdcall TpReleaseTimer(ptr)
@ stdcall TpReleaseWait(ptr)
@ stdcall TpReleaseWork(ptr)
@ stdcall TpSetPoolMaxThreads(ptr long)
@ stdcall TpSetPoolMinThreads(ptr long)
@ stdcall TpSetTimer(ptr ptr long long)
@ stdcall TpSetWait(ptr long ptr)
@ stdcall TpSimpleTryPost(ptr ptr ptr)
@ stdcall TpWaitForTimer(ptr long)
@ stdcall TpWaitForWait(ptr long)
@ stdcall TpWaitForWork(ptr long)

@ stdcall RtlConnectToSm(ptr ptr long ptr) SmConnectToSm
@ stdcall RtlSendMsgToSm(ptr ptr) SmSendMsgToSm
4 changes: 2 additions & 2 deletions media/doc/WINESYNC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ check Wine current sources first as it may already be fixed.

sdk/lib/3rdparty/strmbase # Synced to WineStaging-3.3

sdk/lib/rtl/actctx.c # Synced to wine-5.18
sdk/lib/rtl/threadpool.c # Synced with wine-9.7
sdk/lib/rtl/actctx.c # Partly synced with WineStaging-1.9.16
sdk/lib/rtl/threadpool.c # Synced with Wine-9.7

advapi32 -
dll/win32/advapi32/wine/cred.c # Synced to WineStaging-3.3
Expand Down
1 change: 1 addition & 0 deletions modules/rostests/winetests/ntdll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ list(APPEND SOURCE
rtlstr.c
string.c
testlist.c
threadpool.c
time.c)

if(ARCH STREQUAL "i386")
Expand Down
2 changes: 2 additions & 0 deletions modules/rostests/winetests/ntdll/testlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern void func_rtl(void);
extern void func_rtlbitmap(void);
extern void func_rtlstr(void);
extern void func_string(void);
extern void func_threadpool(void);
extern void func_time(void);

const struct test winetest_testlist[] =
Expand All @@ -49,6 +50,7 @@ const struct test winetest_testlist[] =
{ "rtlbitmap", func_rtlbitmap },
{ "rtlstr", func_rtlstr },
{ "string", func_string },
{ "threadpool", func_threadpool},
{ "time", func_time },
{ 0, 0 }
};
Loading

0 comments on commit a1c1e9f

Please sign in to comment.