This is needed by chromium tests
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- ...api-ms-win-core-processthreads-l1-1-2.spec | 2 +- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/thread.c | 11 +++++++ dlls/kernelbase/kernelbase.spec | 2 +- include/processthreadsapi.h | 31 +++++++++++++++++++ 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 include/processthreadsapi.h
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 8de6c5b66c..bcb915cdda 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 @@ -54,7 +54,7 @@ @ stdcall SetProcessShutdownParameters(long long) kernel32.SetProcessShutdownParameters @ stdcall SetThreadContext(long ptr) kernel32.SetThreadContext @ stdcall SetThreadIdealProcessorEx(long ptr ptr) kernel32.SetThreadIdealProcessorEx -@ stub SetThreadInformation +@ stdcall SetThreadInformation(long long ptr long) kernel32.SetThreadInformation @ stdcall SetThreadPriority(long long) kernel32.SetThreadPriority @ stdcall SetThreadPriorityBoost(long long) kernel32.SetThreadPriorityBoost @ stdcall SetThreadStackGuarantee(ptr) kernel32.SetThreadStackGuarantee diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 812ffc6ad4..ee8c083044 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1451,6 +1451,7 @@ @ stdcall SetThreadGroupAffinity(long ptr ptr) @ stdcall SetThreadIdealProcessor(long long) @ stdcall SetThreadIdealProcessorEx(long ptr ptr) +@ stdcall SetThreadInformation(long long ptr long) @ stdcall SetThreadLocale(long) @ stdcall SetThreadPreferredUILanguages(long ptr ptr) @ stdcall SetThreadPriority(long long) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index a86ad3443a..5fc47bf298 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -35,6 +35,7 @@ #include "winbase.h" #include "winerror.h" #include "winternl.h" +#include "processthreadsapi.h" #include "wine/exception.h" #include "wine/library.h" #include "wine/server.h" @@ -1180,3 +1181,13 @@ BOOL WINAPI TrySubmitThreadpoolCallback( PTP_SIMPLE_CALLBACK callback, PVOID use
return TRUE; } + +/********************************************************************** + * SetThreadInformation [KERNEL32.@] + */ +BOOL WINAPI SetThreadInformation(HANDLE hthread, THREAD_INFORMATION_CLASS thread_information_class, void *thread_information, DWORD thread_information_size) +{ + FIXME("(%p, %d, %p, %d): stub\n", hthread, thread_information_class, thread_information, thread_information_size); + + return TRUE; +} diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index f07ab7bf9a..0559dc6f31 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1483,7 +1483,7 @@ @ stdcall SetThreadGroupAffinity(long ptr ptr) kernel32.SetThreadGroupAffinity @ stdcall SetThreadIdealProcessor(long long) kernel32.SetThreadIdealProcessor @ stdcall SetThreadIdealProcessorEx(long ptr ptr) kernel32.SetThreadIdealProcessorEx -# @ stub SetThreadInformation +@ stdcall SetThreadInformation(long long ptr long) kernel32.SetThreadInformation @ stdcall SetThreadLocale(long) kernel32.SetThreadLocale @ stdcall SetThreadPreferredUILanguages(long ptr ptr) kernel32.SetThreadPreferredUILanguages @ stdcall SetThreadPriority(long long) kernel32.SetThreadPriority diff --git a/include/processthreadsapi.h b/include/processthreadsapi.h new file mode 100644 index 0000000000..f14cefe5d2 --- /dev/null +++ b/include/processthreadsapi.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2018 Fabian Maurer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_PROCESSTHREADSAPI_H +#define __WINE_PROCESSTHREADSAPI_H + +typedef enum _THREAD_INFORMATION_CLASS { + ThreadMemoryPriority, + ThreadAbsoluteCpuPriority, + ThreadDynamicCodePolicy, + ThreadPowerThrottling, + ThreadInformationClassMax +} THREAD_INFORMATION_CLASS; + +#endif /* __WINE_PROCESSTHREADSAPI_H */ +