From: romanstingler roman.stingler@gmail.com
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- include/Makefile.in | 1 + include/processthreadapi.h | 37 +++++++++++++++++++++++++++++++++++++ include/winnt.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 include/processthreadapi.h
diff --git a/include/Makefile.in b/include/Makefile.in index 979695f552..b875622279 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -521,6 +521,7 @@ SOURCES = \ poppack.h \ powrprof.h \ prntvpt.h \ + processthreadapi.h \ profinfo.h \ propidl.idl \ propkey.h \ diff --git a/include/processthreadapi.h b/include/processthreadapi.h new file mode 100644 index 0000000000..7788b3be20 --- /dev/null +++ b/include/processthreadapi.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2019 Roman Stingler + * + * 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 _PROCESSTHREADAPI_H +#define _PROCESSTHREADAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum _CPU_SET_INFORMATION_TYPE { + CpuSetInformation +} CPU_SET_INFORMATION_TYPE, *PCPU_SET_INFORMATION_TYPE; + + +WINAPI BOOL WINAPI SetThreadSelectedCpuSets(HANDLE,const ULONG *,ULONG); + +#ifdef __cplusplus +} +#endif + +#endif //WINE_SOURCE_PROCESSTHREADAPI_H diff --git a/include/winnt.h b/include/winnt.h index d0d3b2c24a..8c9c844662 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -5511,6 +5511,37 @@ typedef struct _PROCESSOR_POWER_POLICY { } PROCESSOR_POWER_POLICY, *PPROCESSOR_POWER_POLICY;
+#include "processthreadapi.h" + +typedef struct _SYSTEM_CPU_SET_INFORMATION { + DWORD Size; + CPU_SET_INFORMATION_TYPE Type; + union { + struct { + DWORD Id; + WORD Group; + BYTE LogicalProcessorIndex; + BYTE CoreIndex; + BYTE LastLevelCacheIndex; + BYTE NumaNodeIndex; + BYTE EfficiencyClass; + union { + BYTE AllFlags; + struct { + BYTE Parked : 1; + BYTE Allocated : 1; + BYTE RealTime : 1; + BYTE ReservedFlags : 4; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME2; + union { + DWORD Reserved; + }; + DWORD64 AllocationTag; + } CpuSet; + } DUMMYUNIONNAME; +} SYSTEM_CPU_SET_INFORMATION, *PSYSTEM_CPU_SET_INFORMATION; + typedef struct { BOOLEAN AcOnLine; BOOLEAN BatteryPresent;