Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- .../api-ms-win-core-xstate-l2-1-0.spec | 2 +- dlls/kernel32/cpu.c | 9 +++++++++ dlls/kernel32/kernel32.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-xstate-l2-1-0/api-ms-win-core-xstate-l2-1-0.spec b/dlls/api-ms-win-core-xstate-l2-1-0/api-ms-win-core-xstate-l2-1-0.spec index 0f9438dc85..f051097819 100644 --- a/dlls/api-ms-win-core-xstate-l2-1-0/api-ms-win-core-xstate-l2-1-0.spec +++ b/dlls/api-ms-win-core-xstate-l2-1-0/api-ms-win-core-xstate-l2-1-0.spec @@ -1,5 +1,5 @@ @ stub CopyContext -@ stub GetEnabledXStateFeatures +@ stdcall -ret64 -arch=i386,x86_64 GetEnabledXStateFeatures() kernel32.GetEnabledXStateFeatures @ stub GetXStateFeaturesMask @ stub InitializeContext @ stub LocateXStateFeature diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 2e0e79f8e8..ec1fd0f90d 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -327,3 +327,12 @@ DWORD WINAPI GetActiveProcessorCount(WORD group) FIXME("semi-stub, returning %u\n", cpus); return cpus; } + +/*********************************************************************** + * GetEnabledXStateFeatures (KERNEL32.@) + */ +DWORD64 WINAPI GetEnabledXStateFeatures(void) +{ + FIXME("\n"); + return 0; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 11379201a9..c431ecbfb7 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -657,7 +657,7 @@ # @ stub GetDurationFormat # @ stub GetDurationFormatEx @ stdcall GetDynamicTimeZoneInformation(ptr) -# @ stub GetEnabledXStateFeatures +@ stdcall -ret64 -arch=i386,x86_64 GetEnabledXStateFeatures() @ stdcall GetEnvironmentStrings() GetEnvironmentStringsA @ stdcall GetEnvironmentStringsA() @ stdcall GetEnvironmentStringsW() diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index eb6edbe5f7..a834bbeb4d 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -491,7 +491,7 @@ # @ stub GetEffectivePackageStatusForUser # @ stub GetEightBitStringToUnicodeSizeRoutine # @ stub GetEightBitStringToUnicodeStringRoutine -# @ stub GetEnabledXStateFeatures +@ stdcall -ret64 -arch=i386,x86_64 GetEnabledXStateFeatures() kernel32.GetEnabledXStateFeatures @ stdcall GetEnvironmentStrings() kernel32.GetEnvironmentStrings @ stdcall GetEnvironmentStringsA() kernel32.GetEnvironmentStringsA @ stdcall GetEnvironmentStringsW() kernel32.GetEnvironmentStringsW
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com ---
For https://bugs.winehq.org/show_bug.cgi?id=43351
.../api-ms-win-core-processthreads-l1-1-0.spec | 2 +- .../api-ms-win-core-processthreads-l1-1-1.spec | 2 +- .../api-ms-win-core-processthreads-l1-1-2.spec | 2 +- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/thread.c | 20 ++++++++++++++++---- dlls/kernelbase/kernelbase.spec | 2 +- include/winbase.h | 1 + 7 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec b/dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec index 77414bc367..ff13d484f6 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec @@ -2,7 +2,7 @@ @ stdcall CreateProcessAsUserW(long wstr wstr ptr ptr long long ptr wstr ptr ptr) advapi32.CreateProcessAsUserW @ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW @ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread -@ stub CreateRemoteThreadEx +@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx @ stdcall CreateThread(ptr long ptr long long ptr) kernel32.CreateThread @ stdcall DeleteProcThreadAttributeList(ptr) kernel32.DeleteProcThreadAttributeList @ stdcall ExitProcess(long) kernel32.ExitProcess diff --git a/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec b/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec index 149678995c..381db8aa6e 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec @@ -2,7 +2,7 @@ @ stdcall CreateProcessAsUserW(long wstr wstr ptr ptr long long ptr wstr ptr ptr) advapi32.CreateProcessAsUserW @ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW @ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread -@ stub CreateRemoteThreadEx +@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx @ stdcall CreateThread(ptr long ptr long long ptr) kernel32.CreateThread @ stdcall DeleteProcThreadAttributeList(ptr) kernel32.DeleteProcThreadAttributeList @ stdcall ExitProcess(long) kernel32.ExitProcess diff --git a/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec b/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec index 7bfbe72106..fc2feecdb0 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec @@ -2,7 +2,7 @@ @ stdcall CreateProcessAsUserW(long wstr wstr ptr ptr long long ptr wstr ptr ptr) advapi32.CreateProcessAsUserW @ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW @ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread -@ stub CreateRemoteThreadEx +@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx @ stdcall CreateThread(ptr long ptr long long ptr) kernel32.CreateThread @ stdcall DeleteProcThreadAttributeList(ptr) kernel32.DeleteProcThreadAttributeList @ stdcall ExitProcess(long) kernel32.ExitProcess diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index c431ecbfb7..ee11c421a3 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -319,7 +319,7 @@ # @ stub CreateProcessInternalWSecure @ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) @ stdcall CreateRemoteThread(long ptr long ptr long long ptr) -# @ stub CreateRemoteThreadEx +@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) @ stdcall CreateSemaphoreA(ptr long long str) @ stdcall CreateSemaphoreExA(ptr long long str long long) @ stdcall CreateSemaphoreExW(ptr long long wstr long long) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index 6a89993f92..b6ca9f260f 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -55,9 +55,18 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T st sa, stack, start, param, flags, id ); }
- /*************************************************************************** * CreateRemoteThread (KERNEL32.@) + */ +HANDLE WINAPI CreateRemoteThread( HANDLE hProcess, SECURITY_ATTRIBUTES *sa, SIZE_T stack, + LPTHREAD_START_ROUTINE start, LPVOID param, + DWORD flags, DWORD *id ) +{ + return CreateRemoteThreadEx( hProcess, sa, stack, start, param, flags, NULL, id ); +} + +/*************************************************************************** + * CreateRemoteThreadEx (KERNEL32.@) * * Creates a thread that runs in the address space of another process * @@ -73,15 +82,18 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T st * Bad start address for RtlCreateUserThread because the library * may be loaded at different address in other process. */ -HANDLE WINAPI CreateRemoteThread( HANDLE hProcess, SECURITY_ATTRIBUTES *sa, SIZE_T stack, - LPTHREAD_START_ROUTINE start, LPVOID param, - DWORD flags, LPDWORD id ) +HANDLE WINAPI CreateRemoteThreadEx( HANDLE hProcess, SECURITY_ATTRIBUTES *sa, SIZE_T stack, + LPTHREAD_START_ROUTINE start, LPVOID param, DWORD flags, + LPPROC_THREAD_ATTRIBUTE_LIST attributes, DWORD *id ) { HANDLE handle; CLIENT_ID client_id; NTSTATUS status; SIZE_T stack_reserve = 0, stack_commit = 0;
+ if (attributes) + FIXME("thread attributes ignored\n"); + if (flags & STACK_SIZE_PARAM_IS_A_RESERVATION) stack_reserve = stack; else stack_commit = stack;
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index a834bbeb4d..1a6f1ff0fb 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -212,7 +212,7 @@ # @ stub CreateProcessInternalW @ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW @ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread -@ stub CreateRemoteThreadEx +@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx @ stdcall CreateRestrictedToken(long long long ptr long ptr long ptr ptr) advapi32.CreateRestrictedToken @ stdcall CreateSemaphoreExW(ptr long long wstr long long) kernel32.CreateSemaphoreExW @ stdcall CreateSemaphoreW(ptr long long wstr) kernel32.CreateSemaphoreW diff --git a/include/winbase.h b/include/winbase.h index cc719c696c..e47c87a544 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1844,6 +1844,7 @@ WINADVAPI BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECUR #define CreateProcessAsUser WINELIB_NAME_AW(CreateProcessAsUser) WINADVAPI BOOL WINAPI CreateProcessWithLogonW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION); WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); +WINBASEAPI HANDLE WINAPI CreateRemoteThreadEx(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPPROC_THREAD_ATTRIBUTE_LIST,LPDWORD); WINADVAPI BOOL WINAPI CreateRestrictedToken(HANDLE,DWORD,DWORD,PSID_AND_ATTRIBUTES,DWORD,PLUID_AND_ATTRIBUTES,DWORD,PSID_AND_ATTRIBUTES,PHANDLE); WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR); WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);