[PATCH 0/1] MR9952: ntdll: Add stub function for NtWorkerFactoryWorkerReady().
From: Paul Gofman <pgofman@codeweavers.com> --- dlls/ntdll/ntdll.spec | 4 ++-- dlls/ntdll/unix/thread.c | 11 +++++++++++ include/winternl.h | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index c8cd2d34595..fc9a13c49ef 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -449,7 +449,7 @@ @ stdcall -syscall=0x0004 NtWaitForSingleObject(long long ptr) # @ stub NtWaitHighEventPair # @ stub NtWaitLowEventPair -@ stub -syscall=0x0001 NtWorkerFactoryWorkerReady +@ stdcall -syscall=0x0001 NtWorkerFactoryWorkerReady(ptr) @ stdcall -syscall -arch=win32 NtWow64AllocateVirtualMemory64(long ptr int64 ptr long long) @ stdcall -syscall -arch=win32 NtWow64GetNativeSystemInformation(long ptr long ptr) @ stdcall -syscall -arch=win32 NtWow64IsProcessorFeaturePresent(long) @@ -1521,7 +1521,7 @@ @ stdcall -private ZwWaitForSingleObject(long long ptr) NtWaitForSingleObject # @ stub ZwWaitHighEventPair # @ stub ZwWaitLowEventPair -@ stdcall -private ZwWorkerFactoryWorkerReady() NtWorkerFactoryWorkerReady +@ stdcall -private ZwWorkerFactoryWorkerReady(ptr) NtWorkerFactoryWorkerReady @ stdcall -private -arch=win32 ZwWow64AllocateVirtualMemory64(long ptr int64 ptr long long) NtWow64AllocateVirtualMemory64 @ stdcall -private -arch=win32 ZwWow64GetNativeSystemInformation(long ptr long ptr) NtWow64GetNativeSystemInformation @ stdcall -private -arch=win32 ZwWow64IsProcessorFeaturePresent(long) NtWow64IsProcessorFeaturePresent diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 24cd05877b4..cba34ed8ca7 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2743,3 +2743,14 @@ NTSTATUS WINAPI NtGetNextThread( HANDLE process, HANDLE thread, ACCESS_MASK acce *handle = ret_handle; return ret; } + + +/****************************************************************************** + * NtWorkerFactoryWorkerReady (NTDLL.@) + */ +NTSTATUS WINAPI NtWorkerFactoryWorkerReady( HANDLE handle ) +{ + FIXME( "handle %p stub.\n", handle ); + + return STATUS_NOT_IMPLEMENTED; +} diff --git a/include/winternl.h b/include/winternl.h index bdfaa0779fb..26172574f25 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4835,6 +4835,7 @@ NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEG NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,WAIT_TYPE,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE); +NTSYSAPI NTSTATUS WINAPI NtWorkerFactoryWorkerReady(HANDLE); NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG); NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG); NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9952
Needed for RecRoom. The game executes syscall with code 0x1 from time to time. Not sure what it does exactly there, but the game worked without this stub in Proton earlier(with the other patches which are already upstream now and Linux syscall emulation workaround which is not). That was ending up in NtAccessCheck which was failing or crashing returning STATUS_ACCESS_VIOLATION, either way the game worked. Now with syscall 0x0001 explicitly added as spec stub the call results in the fatal exception, while the explicit stub helps. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9952#note_127740
participants (2)
-
Paul Gofman -
Paul Gofman (@gofman)