From: romanstingler roman.stingler@gmail.com
Signed-off-by: romanstingler roman.stingler@gmail.com Signed-off-by: Roman Stingler roman.stingler@gmail.com --- include/winbase.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/winbase.h b/include/winbase.h index 314a8b7f60..3fdfec3d57 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -694,6 +694,11 @@ typedef struct _TIME_ZONE_INFORMATION{ #define PROFILE_USER 0x10000000 #define PROFILE_KERNEL 0x20000000 #define PROFILE_SERVER 0x40000000 +#define CREATE_PROTECTED_PROCESS 0x00040000 +#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000 +#define CREATE_SECURE_PROCESS 0x00400000 +#define EXTENDED_STARTUPINFO_PRESENT 0x00080000 +#define INHERIT_PARENT_AFFINITY 0x00010000
/* File object type definitions
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- ...pi-ms-win-core-kernel32-legacy-l1-1-1.spec | 4 +- dlls/kernel32/kernel32.spec | 8 ++-- dlls/kernel32/process.c | 37 +++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 3 +- include/ntdef.h | 2 + include/winbase.h | 8 ++++ 6 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec b/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec index 5531d2dbd7..946e3de99e 100644 --- a/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec +++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec @@ -29,9 +29,9 @@ @ stub GetMaximumProcessorGroupCount @ stdcall GetNamedPipeClientProcessId(long ptr) kernel32.GetNamedPipeClientProcessId @ stdcall GetNamedPipeServerProcessId(long ptr) kernel32.GetNamedPipeServerProcessId -@ stub GetNumaAvailableMemoryNodeEx +@ stdcall GetNumaAvailableMemoryNodeEx(long ptr) @ stdcall GetNumaNodeProcessorMask(long ptr) kernel32.GetNumaNodeProcessorMask -@ stub GetNumaProcessorNodeEx +@ stdcall GetNumaProcessorNodeEx(ptr ptr) @ stdcall GetShortPathNameA(str ptr long) kernel32.GetShortPathNameA @ stdcall GetStartupInfoA(ptr) kernel32.GetStartupInfoA @ stdcall GetStringTypeExA(long long str long ptr) kernel32.GetStringTypeExA diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 295a4dbab6..08a9a9cd9d 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -742,16 +742,16 @@ # @ stub GetNLSVersionEx # @ stub GetNumaAvailableMemory @ stdcall GetNumaAvailableMemoryNode(long ptr) -# @ stub GetNumaAvailableMemoryNodeEx +@ stdcall GetNumaAvailableMemoryNodeEx(long ptr) @ stdcall GetNumaHighestNodeNumber(ptr) # @ stub GetNumaNodeNumberFromHandle @ stdcall GetNumaNodeProcessorMask(long ptr) @ stdcall GetNumaNodeProcessorMaskEx(long ptr) # @ stub GetNumaProcessorMap @ stdcall GetNumaProcessorNode(long ptr) -# @ stub GetNumaProcessorNodeEx -# @ stub GetNumaProximityNode -# @ stub GetNumaProximityNodeEx +@ stdcall GetNumaProcessorNodeEx(ptr ptr) +@ stdcall GetNumaProximityNode(long ptr) +@ stdcall GetNumaProximityNodeEx(long ptr) @ stdcall GetNumberFormatA(long long str ptr ptr long) @ stdcall GetNumberFormatEx(wstr long wstr ptr ptr long) @ stdcall GetNumberFormatW(long long wstr ptr ptr long) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 09f0433deb..a5e0d8d089 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -4449,6 +4449,16 @@ BOOL WINAPI GetNumaAvailableMemoryNode(UCHAR node, PULONGLONG available_bytes) return FALSE; }
+/********************************************************************** + * GetNumaAvailableMemoryNodeEx (KERNEL32.@) + */ +BOOL WINAPI GetNumaAvailableMemoryNodeEx(USHORT node, PULONGLONG available_bytes) +{ + FIXME("(%c %p): stub\n", node, available_bytes); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /*********************************************************************** * GetNumaProcessorNode (KERNEL32.@) */ @@ -4470,6 +4480,33 @@ BOOL WINAPI GetNumaProcessorNode(UCHAR processor, PUCHAR node) return FALSE; }
+/*********************************************************************** + * GetNumaProcessorNodeEx (KERNEL32.@) + */ +BOOL WINAPI GetNumaProcessorNodeEx(PPROCESSOR_NUMBER processor, PUSHORT node_number) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/*********************************************************************** + * GetNumaProximityNode (KERNEL32.@) + */ +BOOL WINAPI GetNumaProximityNode(ULONG proximity_id, PUCHAR node_number) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/*********************************************************************** + * GetNumaProximityNodeEx (KERNEL32.@) + */ +BOOL WINAPI GetNumaProximityNodeEx(ULONG proximity_id, PUSHORT node_number) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /********************************************************************** * GetProcessDEPPolicy (KERNEL32.@) */ diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 22ea65fe1c..abddb12533 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -576,7 +576,8 @@ # @ stub GetNextFgPolicyRefreshInfoInternal @ stdcall GetNumaHighestNodeNumber(ptr) kernel32.GetNumaHighestNodeNumber @ stdcall GetNumaNodeProcessorMaskEx(long ptr) kernel32.GetNumaNodeProcessorMaskEx -# @ stub GetNumaProximityNodeEx +@ stdcall GetNumaProximityNode(long ptr) kernel32.GetNumaProximityNode +@ stdcall GetNumaProximityNodeEx(long ptr) kernel32.GetNumaProximityNodeEx @ stdcall GetNumberFormatEx(wstr long wstr ptr ptr long) kernel32.GetNumberFormatEx @ stdcall GetNumberFormatW(long long wstr ptr ptr long) kernel32.GetNumberFormatW @ stdcall GetNumberOfConsoleInputEvents(long ptr) kernel32.GetNumberOfConsoleInputEvents diff --git a/include/ntdef.h b/include/ntdef.h index 83ecffd608..b9a27cabcb 100644 --- a/include/ntdef.h +++ b/include/ntdef.h @@ -39,6 +39,8 @@ typedef enum _WAIT_TYPE { WaitNotification } WAIT_TYPE;
+#define MAXUSHORT 0xffff + #ifdef __cplusplus } #endif diff --git a/include/winbase.h b/include/winbase.h index 3fdfec3d57..01fc4f5448 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1680,6 +1680,7 @@ typedef enum _PROC_THREAD_ATTRIBUTE_NUM ProcThreadAttributeParentProcess = 0, ProcThreadAttributeHandleList = 2, ProcThreadAttributeGroupAffinity = 3, + ProcThreadAttributePreferredNode = 4, ProcThreadAttributeIdealProcessor = 5, ProcThreadAttributeUmsThread = 6, ProcThreadAttributeMitigationPolicy = 7, @@ -1695,6 +1696,7 @@ typedef enum _PROC_THREAD_ATTRIBUTE_NUM #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT) #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT) #define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY (ProcThreadAttributeGroupAffinity | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT) +#define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE (ProcThreadAttributePreferredNode | PROC_THREAD_ATTRIBUTE_INPUT) #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT) #define PROC_THREAD_ATTRIBUTE_UMS_THREAD (ProcThreadAttributeUmsThread | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT) #define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY (ProcThreadAttributeMitigationPolicy | PROC_THREAD_ATTRIBUTE_INPUT) @@ -2184,6 +2186,12 @@ WINBASEAPI BOOL WINAPI GetNamedPipeServerSessionId(HANDLE,PULONG); WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO); WINBASEAPI PUMS_CONTEXT WINAPI GetNextUmsListItem(PUMS_CONTEXT); WINBASEAPI BOOL WINAPI GetNumaProcessorNode(UCHAR,PUCHAR); +WINBASEAPI BOOL WINAPI GetNumaAvailableMemoryNode(UCHAR,PULONGLONG); +WINBASEAPI BOOL WINAPI GetNumaNodeProcessorMaskEx(USHORT,PGROUP_AFFINITY); +WINBASEAPI BOOL WINAPI GetNumaProcessorNodeEx(PPROCESSOR_NUMBER,PUSHORT); +WINBASEAPI BOOL WINAPI GetNumaProximityNode(ULONG,PUCHAR); +WINBASEAPI BOOL WINAPI GetNumaAvailableMemoryNodeEx(USHORT,PULONGLONG); +WINBASEAPI BOOL WINAPI GetNumaProximityNodeEx(ULONG,PUSHORT); WINADVAPI BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD); WINADVAPI BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD); WINBASEAPI BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/sync.c | 10 ++++++++++ include/winbase.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 08a9a9cd9d..cc2283f886 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -283,7 +283,7 @@ @ stdcall CreateFile2(wstr long long long ptr) @ stdcall CreateFileA(str long long ptr long long long) @ stdcall CreateFileMappingA(long ptr long long long str) -# @ stub CreateFileMappingNumaA +@ stdcall CreateFileMappingNumaA(long ptr long long long str long) # @ stub CreateFileMappingNumaW @ stdcall CreateFileMappingW(long ptr long long long wstr) @ stdcall CreateFileW(wstr long long ptr long long long) diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index 9f5b614508..fd615575c4 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -1346,6 +1346,16 @@ HANDLE WINAPI CreateFileMappingW( HANDLE file, LPSECURITY_ATTRIBUTES sa, DWORD p }
+/*********************************************************************** + * CreateFileMappingNumaA (KERNEL32.@) + */ +HANDLE WINAPI CreateFileMappingNumaA(HANDLE file,LPSECURITY_ATTRIBUTES sa, + DWORD protect, DWORD size_high, DWORD size_low, LPCSTR name,DWORD preferred_numa_node) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return NULL; +} + /*********************************************************************** * OpenFileMappingA (KERNEL32.@) */ diff --git a/include/winbase.h b/include/winbase.h index 01fc4f5448..f1668de5c2 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1850,6 +1850,7 @@ WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBU WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR); WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR); #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping) +WINBASEAPI HANDLE WINAPI CreateFileMappingNumaA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR,DWORD); WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE,HANDLE,ULONG_PTR,DWORD); WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES,LPCSTR); WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES,LPCWSTR);
Roman Stingler roman.stingler@gmail.com writes:
+/***********************************************************************
CreateFileMappingNumaA (KERNEL32.@)
- */
+HANDLE WINAPI CreateFileMappingNumaA(HANDLE file,LPSECURITY_ATTRIBUTES sa,
DWORD protect, DWORD size_high, DWORD size_low, LPCSTR name,DWORD preferred_numa_node)
+{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return NULL;
+}
It would be better to simply fall back to standard CreateFileMappingA.
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;
From: romanstingler roman.stingler@gmail.com
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/thread.c | 11 +++++++++++ 2 files changed, 12 insertions(+)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index cc2283f886..6eb211161a 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1456,6 +1456,7 @@ @ stdcall SetThreadPreferredUILanguages(long ptr ptr) @ stdcall SetThreadPriority(long long) @ stdcall SetThreadPriorityBoost(long long) +@ stdcall SetThreadSelectedCpuSets(long ptr long); @ stdcall SetThreadStackGuarantee(ptr) # @ stub SetThreadToken @ stdcall SetThreadUILanguage(long) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index d167abe24a..84e2571809 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -39,6 +39,7 @@ #include "wine/library.h" #include "wine/server.h" #include "wine/debug.h" +#include "processthreadapi.h"
#include "kernel_private.h"
@@ -1189,3 +1190,13 @@ BOOL WINAPI TrySubmitThreadpoolCallback( PTP_SIMPLE_CALLBACK callback, PVOID use
return TRUE; } + + +/*********************************************************************** + * SetThreadSelectedCpuSets (KERNEL32.@) + */ +BOOL WINAPI SetThreadSelectedCpuSets(HANDLE thread,const ULONG *cpu_set_ids,ULONG cpu_set_id_count) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} \ No newline at end of file
From: romanstingler roman.stingler@gmail.com
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- .../api-ms-win-core-kernel32-legacy-l1-1-0.spec | 2 +- .../api-ms-win-core-kernel32-legacy-l1-1-1.spec | 2 +- dlls/kernel32/cpu.c | 9 +++++++++ dlls/kernel32/kernel32.spec | 2 +- include/winbase.h | 1 + 5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec b/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec index e653ac6d21..b6af37ab0a 100644 --- a/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec +++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec @@ -21,7 +21,7 @@ @ stdcall GetComputerNameW(ptr ptr) kernel32.GetComputerNameW @ stdcall GetConsoleWindow() kernel32.GetConsoleWindow @ stub GetDurationFormatEx -@ stub GetMaximumProcessorGroupCount +@ stdcall GetMaximumProcessorGroupCount() kernel32.GetMaximumProcessorGroupCount @ stdcall GetNamedPipeClientProcessId(long ptr) kernel32.GetNamedPipeClientProcessId @ stdcall GetNamedPipeServerProcessId(long ptr) kernel32.GetNamedPipeServerProcessId @ stdcall GetShortPathNameA(str ptr long) kernel32.GetShortPathNameA diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec b/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec index 946e3de99e..fca40f113b 100644 --- a/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec +++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-1/api-ms-win-core-kernel32-legacy-l1-1-1.spec @@ -26,7 +26,7 @@ @ stub GetDurationFormatEx @ stub GetFileAttributesTransactedW @ stub GetFirmwareType -@ stub GetMaximumProcessorGroupCount +@ stdcall GetMaximumProcessorGroupCount() kernel32.GetMaximumProcessorGroupCount @ stdcall GetNamedPipeClientProcessId(long ptr) kernel32.GetNamedPipeClientProcessId @ stdcall GetNamedPipeServerProcessId(long ptr) kernel32.GetNamedPipeServerProcessId @ stdcall GetNumaAvailableMemoryNodeEx(long ptr) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 9445d0bc05..9285b312dc 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -336,6 +336,15 @@ DWORD WINAPI GetMaximumProcessorCount(WORD group) return cpus; }
+/*********************************************************************** + * GetMaximumProcessorGroupCount (KERNEL32.@) + */ +WORD WINAPI GetMaximumProcessorGroupCount() +{ + FIXME("\n"); + return 1; +} + /*********************************************************************** * GetEnabledXStateFeatures (KERNEL32.@) */ diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 6eb211161a..dce1b53810 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -717,7 +717,7 @@ @ stdcall GetLongPathNameW (wstr long long) @ stdcall GetMailslotInfo(long ptr ptr ptr ptr) @ stdcall GetMaximumProcessorCount(long) -# @ stub GetMaximumProcessorGroupCount +@ stdcall GetMaximumProcessorGroupCount() @ stdcall GetModuleFileNameA(long ptr long) @ stdcall GetModuleFileNameW(long ptr long) @ stdcall GetModuleHandleA(str) diff --git a/include/winbase.h b/include/winbase.h index f1668de5c2..6ef3b1ab4d 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2167,6 +2167,7 @@ WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD); WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD); #define GetLongPathName WINELIB_NAME_AW(GetLongPathName) WINBASEAPI BOOL WINAPI GetMailslotInfo(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD); +WINBASEAPI WORD WINAPI GetMaximumProcessorGroupCount(void); WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD); WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD); #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
From: romanstingler roman.stingler@gmail.com
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- dlls/kernel32/cpu.c | 9 +++++++++ dlls/kernel32/kernel32.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 9285b312dc..5355743415 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -384,3 +384,12 @@ UINT WINAPI GetSystemFirmwareTable(DWORD provider, DWORD id, void *buffer, DWORD HeapFree(GetProcessHeap(), 0, sfti); return buffer_size; } + +/*********************************************************************** + * GetNumaNodeNumberFromHandle (KERNEL32.@) + */ +BOOL WINAPI GetNumaNodeNumberFromHandle(HANDLE file,PUSHORT node_number) +{ + FIXME("\n"); + return 1; +} \ No newline at end of file diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index dce1b53810..2fd5bb40b8 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -744,7 +744,7 @@ @ stdcall GetNumaAvailableMemoryNode(long ptr) @ stdcall GetNumaAvailableMemoryNodeEx(long ptr) @ stdcall GetNumaHighestNodeNumber(ptr) -# @ stub GetNumaNodeNumberFromHandle +@ stdcall GetNumaNodeNumberFromHandle(long ptr) @ stdcall GetNumaNodeProcessorMask(long ptr) @ stdcall GetNumaNodeProcessorMaskEx(long ptr) # @ stub GetNumaProcessorMap
From: Roman Stingler roman.stingler@symvaro.com
Signed-off-by: Roman Stingler roman.stingler@symvaro.com --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/process.c | 11 +++++++++++ dlls/kernelbase/kernelbase.spec | 2 +- include/Makefile.in | 1 + include/processtopologyapi.h | 34 +++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 include/processtopologyapi.h
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 6f4f64d7cb..5cf2b2a4dc 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -778,7 +778,7 @@ @ stdcall GetProcessAffinityMask(long ptr ptr) @ stdcall GetProcessDEPPolicy(long ptr ptr) @ stdcall GetProcessFlags(long) -# @ stub GetProcessGroupAffinity +@ stdcall GetProcessGroupAffinity(long ptr ptr) @ stdcall GetProcessHandleCount(long ptr) @ stdcall -norelay GetProcessHeap() @ stdcall GetProcessHeaps(long ptr) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 6e346a1c3b..110b6cb113 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -62,6 +62,7 @@ #include "wine/server.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "processtopologyapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(process); WINE_DECLARE_DEBUG_CHANNEL(relay); @@ -4858,3 +4859,13 @@ BOOL WINAPI GetProcessMitigationPolicy(HANDLE hProcess, PROCESS_MITIGATION_POLIC
return TRUE; } + + +/********************************************************************** + * GetProcessGroupAffinity (KERNEL32.@) + */ +BOOL WINAPI GetProcessGroupAffinity(HANDLE process, PUSHORT group_count, PUSHORT group_array) +{ + FIXME("(%p, %p, %p): stub\n", process, group_count, group_array); + return 0; +} diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index abddb12533..4f72969bbf 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -622,7 +622,7 @@ @ stdcall GetProcAddress(long str) kernel32.GetProcAddress # @ stub GetProcAddressForCaller # @ stub GetProcessDefaultCpuSets -# @ stub GetProcessGroupAffinity +@ stdcall GetProcessGroupAffinity(long ptr ptr) @ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount @ stdcall -norelay GetProcessHeap() kernel32.GetProcessHeap @ stdcall GetProcessHeaps(long ptr) kernel32.GetProcessHeaps diff --git a/include/Makefile.in b/include/Makefile.in index 9ffa9cbe41..2e9126619b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -521,6 +521,7 @@ SOURCES = \ powrprof.h \ prntvpt.h \ processthreadapi.h \ + processtopologyapi.h \ profinfo.h \ propidl.idl \ propkey.h \ diff --git a/include/processtopologyapi.h b/include/processtopologyapi.h new file mode 100644 index 0000000000..5a37793ff3 --- /dev/null +++ b/include/processtopologyapi.h @@ -0,0 +1,34 @@ +/* + * 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 PROCESSTOPOLOGYAPI_H +#define PROCESSTOPOLOGYAPI_H + + +#ifdef __cplusplus +extern "C" { +#endif + +WINBASEAPI BOOL WINAPI GetProcessGroupAffinity(HANDLE,PUSHORT,PUSHORT); + + +#ifdef __cplusplus +} +#endif + +#endif //WINE_SOURCE_PROCESSTOPOLOGYAPI_H
From: romanstingler roman.stingler@gmail.com
Signed-off-by: Roman Stingler roman.stingler@gmail.com --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/process.c | 11 +++++++++++ dlls/kernelbase/kernelbase.spec | 2 +- include/Makefile.in | 1 + include/processtopologyapi.h | 34 +++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 include/processtopologyapi.h
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 2fd5bb40b8..e6c160fe57 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -778,7 +778,7 @@ @ stdcall GetProcessAffinityMask(long ptr ptr) @ stdcall GetProcessDEPPolicy(long ptr ptr) @ stdcall GetProcessFlags(long) -# @ stub GetProcessGroupAffinity +@ stdcall GetProcessGroupAffinity(long ptr ptr) @ stdcall GetProcessHandleCount(long ptr) @ stdcall -norelay GetProcessHeap() @ stdcall GetProcessHeaps(long ptr) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index a5e0d8d089..d0fb2adcfa 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -62,6 +62,7 @@ #include "wine/server.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "processtopologyapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(process); WINE_DECLARE_DEBUG_CHANNEL(relay); @@ -4858,3 +4859,13 @@ BOOL WINAPI GetProcessMitigationPolicy(HANDLE hProcess, PROCESS_MITIGATION_POLIC
return TRUE; } + + +/********************************************************************** + * GetProcessGroupAffinity (KERNEL32.@) + */ +BOOL WINAPI GetProcessGroupAffinity(HANDLE process, PUSHORT group_count, PUSHORT group_array) +{ + FIXME("(%p, %p, %p): stub\n", process, group_count, group_array); + return 1; +} diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index abddb12533..4f72969bbf 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -622,7 +622,7 @@ @ stdcall GetProcAddress(long str) kernel32.GetProcAddress # @ stub GetProcAddressForCaller # @ stub GetProcessDefaultCpuSets -# @ stub GetProcessGroupAffinity +@ stdcall GetProcessGroupAffinity(long ptr ptr) @ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount @ stdcall -norelay GetProcessHeap() kernel32.GetProcessHeap @ stdcall GetProcessHeaps(long ptr) kernel32.GetProcessHeaps diff --git a/include/Makefile.in b/include/Makefile.in index b875622279..f1a0bd268b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -522,6 +522,7 @@ SOURCES = \ powrprof.h \ prntvpt.h \ processthreadapi.h \ + processtopologyapi.h \ profinfo.h \ propidl.idl \ propkey.h \ diff --git a/include/processtopologyapi.h b/include/processtopologyapi.h new file mode 100644 index 0000000000..b549677f5b --- /dev/null +++ b/include/processtopologyapi.h @@ -0,0 +1,34 @@ +/* + * 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 PROCESSTOPOLOGYAPI_H +#define PROCESSTOPOLOGYAPI_H + + +#ifdef __cplusplus +extern "C" { +#endif + +WINAPI BOOL WINAPI GetProcessGroupAffinity(HANDLE,PUSHORT,PUSHORT); + + +#ifdef __cplusplus +} +#endif + +#endif //WINE_SOURCE_PROCESSTOPOLOGYAPI_H