[PATCH v2 0/1] MR5497: ntdll: Implement NtQueueApcThreadEx()
Should resolve a crash in `libogg` in the game "Cabal Online" -- v2: ntdll: Implement NtQueueApcThreadEx() https://gitlab.winehq.org/wine/wine/-/merge_requests/5497
From: Isaac Marovitz <isaacryu(a)icloud.com> --- dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/ntsyscalls.h | 320 ++++++++++++++++++++------------------- dlls/ntdll/unix/thread.c | 28 ++++ include/winternl.h | 1 + 4 files changed, 191 insertions(+), 159 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 014c221e59f..3238450fd73 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -338,6 +338,7 @@ @ stdcall -syscall NtQueryVirtualMemory(long ptr long ptr long ptr) @ stdcall -syscall NtQueryVolumeInformationFile(long ptr ptr long long) @ stdcall -syscall NtQueueApcThread(long ptr long long long) +@ stdcall -syscall NtQueueApcThreadEx(long long ptr long long long) @ stdcall -syscall NtRaiseException(ptr ptr long) @ stdcall -syscall NtRaiseHardError(long long ptr ptr long ptr) @ stdcall -syscall NtReadFile(long long ptr ptr ptr ptr long ptr ptr) diff --git a/dlls/ntdll/ntsyscalls.h b/dlls/ntdll/ntsyscalls.h index 53045c5f6be..55e1436848b 100644 --- a/dlls/ntdll/ntsyscalls.h +++ b/dlls/ntdll/ntsyscalls.h @@ -160,88 +160,89 @@ SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 24 ) \ SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 20 ) \ SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 20 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseException, 12 ) \ - SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 24 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFile, 36 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 36 ) \ - SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 4 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 8 ) \ - SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 24 ) \ - SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 8 ) \ - SYSCALL_ENTRY( 0x00ab, NtRenameKey, 8 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 12 ) \ - SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 16 ) \ - SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 12 ) \ - SYSCALL_ENTRY( 0x00af, NtResetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 12 ) \ - SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 12 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 4 ) \ - SYSCALL_ENTRY( 0x00b3, NtResumeThread, 8 ) \ - SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 8 ) \ - SYSCALL_ENTRY( 0x00b5, NtSaveKey, 8 ) \ - SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 36 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 8 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 12 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 16 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 20 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 16 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 16 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 16 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 16 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 16 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 8 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 24 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 12 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 12 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 8 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 8 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimer, 28 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 24 ) \ - SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 4 ) \ - SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 16 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 4 ) \ - SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 8 ) \ - SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 24 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 8 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 8 ) \ - SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00da, NtTraceControl, 24 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 4 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 4 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 20 ) \ - SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 8 ) \ - SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 12 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 8 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 20 ) \ - SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 12 ) \ - SYSCALL_ENTRY( 0x00e6, NtWow64AllocateVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e7, NtWow64GetNativeSystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x00e8, NtWow64IsProcessorFeaturePresent, 4 ) \ - SYSCALL_ENTRY( 0x00e9, NtWow64ReadVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00ea, NtWow64WriteVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00eb, NtWriteFile, 36 ) \ - SYSCALL_ENTRY( 0x00ec, NtWriteFileGather, 36 ) \ - SYSCALL_ENTRY( 0x00ed, NtWriteVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00ee, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00ef, wine_nt_to_unix_file_name, 16 ) \ - SYSCALL_ENTRY( 0x00f0, wine_unix_to_nt_file_name, 12 ) + SYSCALL_ENTRY( 0x009f, NtQueueApcThreadEx, 24 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseException, 12 ) \ + SYSCALL_ENTRY( 0x00a1, NtRaiseHardError, 24 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFile, 36 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadFileScatter, 36 ) \ + SYSCALL_ENTRY( 0x00a4, NtReadVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00a5, NtRegisterThreadTerminatePort, 4 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseMutant, 8 ) \ + SYSCALL_ENTRY( 0x00a8, NtReleaseSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletionEx, 24 ) \ + SYSCALL_ENTRY( 0x00ab, NtRemoveProcessDebug, 8 ) \ + SYSCALL_ENTRY( 0x00ac, NtRenameKey, 8 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplaceKey, 12 ) \ + SYSCALL_ENTRY( 0x00ae, NtReplyWaitReceivePort, 16 ) \ + SYSCALL_ENTRY( 0x00af, NtRequestWaitReplyPort, 12 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00b1, NtResetWriteWatch, 12 ) \ + SYSCALL_ENTRY( 0x00b2, NtRestoreKey, 12 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeProcess, 4 ) \ + SYSCALL_ENTRY( 0x00b4, NtResumeThread, 8 ) \ + SYSCALL_ENTRY( 0x00b5, NtRollbackTransaction, 8 ) \ + SYSCALL_ENTRY( 0x00b6, NtSaveKey, 8 ) \ + SYSCALL_ENTRY( 0x00b7, NtSecureConnectPort, 36 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetContextThread, 8 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDebugFilterState, 12 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEaFile, 16 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationDebugObject, 20 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationKey, 16 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationObject, 16 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationProcess, 16 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationThread, 16 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationToken, 16 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetInformationVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIntervalProfile, 8 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetLdtEntries, 24 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSecurityObject, 12 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemInformation, 12 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetSystemTime, 8 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetThreadExecutionState, 8 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimer, 28 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetValueKey, 24 ) \ + SYSCALL_ENTRY( 0x00d1, NtSetVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00d2, NtShutdownSystem, 4 ) \ + SYSCALL_ENTRY( 0x00d3, NtSignalAndWaitForSingleObject, 16 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendProcess, 4 ) \ + SYSCALL_ENTRY( 0x00d5, NtSuspendThread, 8 ) \ + SYSCALL_ENTRY( 0x00d6, NtSystemDebugControl, 24 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateJobObject, 8 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d9, NtTerminateThread, 8 ) \ + SYSCALL_ENTRY( 0x00da, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00db, NtTraceControl, 24 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadDriver, 4 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnloadKey, 4 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockFile, 20 ) \ + SYSCALL_ENTRY( 0x00df, NtUnlockVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSection, 8 ) \ + SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSectionEx, 12 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForAlertByThreadId, 8 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForDebugEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForMultipleObjects, 20 ) \ + SYSCALL_ENTRY( 0x00e6, NtWaitForSingleObject, 12 ) \ + SYSCALL_ENTRY( 0x00e7, NtWow64AllocateVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00e8, NtWow64GetNativeSystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x00e9, NtWow64IsProcessorFeaturePresent, 4 ) \ + SYSCALL_ENTRY( 0x00ea, NtWow64ReadVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00eb, NtWow64WriteVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00ec, NtWriteFile, 36 ) \ + SYSCALL_ENTRY( 0x00ed, NtWriteFileGather, 36 ) \ + SYSCALL_ENTRY( 0x00ee, NtWriteVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00ef, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00f0, wine_nt_to_unix_file_name, 16 ) \ + SYSCALL_ENTRY( 0x00f1, wine_unix_to_nt_file_name, 12 ) #define ALL_SYSCALLS64 \ SYSCALL_ENTRY( 0x0000, NtAcceptConnectPort, 48 ) \ @@ -403,80 +404,81 @@ SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 48 ) \ SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 40 ) \ SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 40 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseException, 24 ) \ - SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 48 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFile, 72 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 72 ) \ - SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 8 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 16 ) \ - SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 48 ) \ - SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 16 ) \ - SYSCALL_ENTRY( 0x00ab, NtRenameKey, 16 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 24 ) \ - SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 32 ) \ - SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 24 ) \ - SYSCALL_ENTRY( 0x00af, NtResetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 24 ) \ - SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 24 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 8 ) \ - SYSCALL_ENTRY( 0x00b3, NtResumeThread, 16 ) \ - SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 16 ) \ - SYSCALL_ENTRY( 0x00b5, NtSaveKey, 16 ) \ - SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 72 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 16 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 24 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 32 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 40 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 32 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 32 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 32 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 32 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 32 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 32 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 16 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 32 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 24 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 24 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 16 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 16 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimer, 56 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 48 ) \ - SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 8 ) \ - SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 32 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 16 ) \ - SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 48 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 16 ) \ - SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 16 ) \ - SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00da, NtTraceControl, 48 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 8 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 8 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 40 ) \ - SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 16 ) \ - SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 24 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 16 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 40 ) \ - SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 24 ) \ - SYSCALL_ENTRY( 0x00e6, NtWriteFile, 72 ) \ - SYSCALL_ENTRY( 0x00e7, NtWriteFileGather, 72 ) \ - SYSCALL_ENTRY( 0x00e8, NtWriteVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00e9, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00ea, wine_nt_to_unix_file_name, 32 ) \ - SYSCALL_ENTRY( 0x00eb, wine_unix_to_nt_file_name, 24 ) + SYSCALL_ENTRY( 0x009f, NtQueueApcThreadEx, 48 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseException, 24 ) \ + SYSCALL_ENTRY( 0x00a1, NtRaiseHardError, 48 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFile, 72 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadFileScatter, 72 ) \ + SYSCALL_ENTRY( 0x00a4, NtReadVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00a5, NtRegisterThreadTerminatePort, 8 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseMutant, 16 ) \ + SYSCALL_ENTRY( 0x00a8, NtReleaseSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletionEx, 48 ) \ + SYSCALL_ENTRY( 0x00ab, NtRemoveProcessDebug, 16 ) \ + SYSCALL_ENTRY( 0x00ac, NtRenameKey, 16 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplaceKey, 24 ) \ + SYSCALL_ENTRY( 0x00ae, NtReplyWaitReceivePort, 32 ) \ + SYSCALL_ENTRY( 0x00af, NtRequestWaitReplyPort, 24 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00b1, NtResetWriteWatch, 24 ) \ + SYSCALL_ENTRY( 0x00b2, NtRestoreKey, 24 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeProcess, 8 ) \ + SYSCALL_ENTRY( 0x00b4, NtResumeThread, 16 ) \ + SYSCALL_ENTRY( 0x00b5, NtRollbackTransaction, 16 ) \ + SYSCALL_ENTRY( 0x00b6, NtSaveKey, 16 ) \ + SYSCALL_ENTRY( 0x00b7, NtSecureConnectPort, 72 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetContextThread, 16 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDebugFilterState, 24 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEaFile, 32 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationDebugObject, 40 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationJobObject, 32 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationKey, 32 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationObject, 32 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationProcess, 32 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationThread, 32 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationToken, 32 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetInformationVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIntervalProfile, 16 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetLdtEntries, 32 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSecurityObject, 24 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemInformation, 24 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetSystemTime, 16 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetThreadExecutionState, 16 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimer, 56 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetValueKey, 48 ) \ + SYSCALL_ENTRY( 0x00d1, NtSetVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00d2, NtShutdownSystem, 8 ) \ + SYSCALL_ENTRY( 0x00d3, NtSignalAndWaitForSingleObject, 32 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d5, NtSuspendThread, 16 ) \ + SYSCALL_ENTRY( 0x00d6, NtSystemDebugControl, 48 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateProcess, 16 ) \ + SYSCALL_ENTRY( 0x00d9, NtTerminateThread, 16 ) \ + SYSCALL_ENTRY( 0x00da, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00db, NtTraceControl, 48 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadDriver, 8 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnloadKey, 8 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockFile, 40 ) \ + SYSCALL_ENTRY( 0x00df, NtUnlockVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSection, 16 ) \ + SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSectionEx, 24 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForAlertByThreadId, 16 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForDebugEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForMultipleObjects, 40 ) \ + SYSCALL_ENTRY( 0x00e6, NtWaitForSingleObject, 24 ) \ + SYSCALL_ENTRY( 0x00e7, NtWriteFile, 72 ) \ + SYSCALL_ENTRY( 0x00e8, NtWriteFileGather, 72 ) \ + SYSCALL_ENTRY( 0x00e9, NtWriteVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00ea, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00eb, wine_nt_to_unix_file_name, 32 ) \ + SYSCALL_ENTRY( 0x00ec, wine_unix_to_nt_file_name, 24 ) diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 7ae5c022fb2..d9e9704259f 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -1689,6 +1689,34 @@ NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1 } +/****************************************************************************** + * NtQueueApcThreadEx (NTDLL.@) + */ +NTSTATUS WINAPI NtQueueApcThreadEx( HANDLE handle, HANDLE reserve_handle, PNTAPCFUNC func, + ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3 ) +{ + NTSTATUS ret; + + SERVER_START_REQ( queue_apc ) + { + FIXME( "reserve handle should be used: %p\n", reserve_handle ) + req->handle = wine_server_obj_handle( handle ); + if (func) + { + req->call.type = APC_USER; + req->call.user.func = wine_server_client_ptr( func ); + req->call.user.args[0] = arg1; + req->call.user.args[1] = arg2; + req->call.user.args[2] = arg3; + } + else req->call.type = APC_NONE; /* wake up only */ + ret = wine_server_call( req ); + } + SERVER_END_REQ; + return ret; +} + + /*********************************************************************** * set_thread_context */ diff --git a/include/winternl.h b/include/winternl.h index c39d6427e52..5b897b0276c 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4517,6 +4517,7 @@ NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*); NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,LONG*); NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR); +NTSYSAPI NTSTATUS WINAPI NtQueueApcThreadEx(HANDLE,HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR); NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*); NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*); NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5497
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145000 Your paranoid android. === debian11 (build log) === ../wine/dlls/ntdll/unix/thread.c:1703:9: error: expected ���;��� before ���req��� ../wine/dlls/ntdll/unix/thread.c:1706:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1707:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1708:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1709:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1710:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1712:17: error: ���struct queue_apc_request��� has no member named ���call��� Task: The win32 Wine build failed === debian11b (build log) === ../wine/dlls/ntdll/unix/thread.c:1703:9: error: expected ���;��� before ���req��� ../wine/dlls/ntdll/unix/thread.c:1706:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1707:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1708:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1709:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1710:16: error: ���struct queue_apc_request��� has no member named ���call��� ../wine/dlls/ntdll/unix/thread.c:1712:17: error: ���struct queue_apc_request��� has no member named ���call��� Task: The wow64 Wine build failed
participants (3)
-
Isaac Marovitz -
Isaac Marovitz (@IsaacMarovitz) -
Marvin