@@ -166,11 +166,9 @@ typedef struct MI_PROCESSOR_NUMBER_S { WORD Group; BYTE Number; BYTE Reserved; }
166166typedef VOID (__stdcall * PGetCurrentProcessorNumberEx )(MI_PROCESSOR_NUMBER * ProcNumber );
167167typedef BOOL (__stdcall * PGetNumaProcessorNodeEx )(MI_PROCESSOR_NUMBER * Processor , PUSHORT NodeNumber );
168168typedef BOOL (__stdcall* PGetNumaNodeProcessorMaskEx )(USHORT Node , PGROUP_AFFINITY ProcessorMask );
169- typedef BOOL (__stdcall * PGetNumaProcessorNode )(UCHAR Processor , PUCHAR NodeNumber );
170169static PGetCurrentProcessorNumberEx pGetCurrentProcessorNumberEx = NULL ;
171170static PGetNumaProcessorNodeEx pGetNumaProcessorNodeEx = NULL ;
172171static PGetNumaNodeProcessorMaskEx pGetNumaNodeProcessorMaskEx = NULL ;
173- static PGetNumaProcessorNode pGetNumaProcessorNode = NULL ;
174172
175173static bool mi_win_enable_large_os_pages (void )
176174{
@@ -236,7 +234,6 @@ void _mi_os_init(void)
236234 pGetCurrentProcessorNumberEx = (PGetCurrentProcessorNumberEx )(void (* )(void ))GetProcAddress (hDll , "GetCurrentProcessorNumberEx" );
237235 pGetNumaProcessorNodeEx = (PGetNumaProcessorNodeEx )(void (* )(void ))GetProcAddress (hDll , "GetNumaProcessorNodeEx" );
238236 pGetNumaNodeProcessorMaskEx = (PGetNumaNodeProcessorMaskEx )(void (* )(void ))GetProcAddress (hDll , "GetNumaNodeProcessorMaskEx" );
239- pGetNumaProcessorNode = (PGetNumaProcessorNode )(void (* )(void ))GetProcAddress (hDll , "GetNumaProcessorNode" );
240237 FreeLibrary (hDll );
241238 }
242239 if (mi_option_is_enabled (mi_option_large_os_pages ) || mi_option_is_enabled (mi_option_reserve_huge_os_pages )) {
@@ -1319,11 +1316,11 @@ static size_t mi_os_numa_nodex(void) {
13191316 BOOL ok = (* pGetNumaProcessorNodeEx )(& pnum , & nnode );
13201317 if (ok ) numa_node = nnode ;
13211318 }
1322- else if ( pGetNumaProcessorNode != NULL ) {
1319+ else {
13231320 // Vista or earlier, use older API that is limited to 64 processors. Issue #277
13241321 DWORD pnum = GetCurrentProcessorNumber ();
13251322 UCHAR nnode = 0 ;
1326- BOOL ok = pGetNumaProcessorNode ((UCHAR )pnum , & nnode );
1323+ BOOL ok = GetNumaProcessorNode ((UCHAR )pnum , & nnode );
13271324 if (ok ) numa_node = nnode ;
13281325 }
13291326 return numa_node ;
0 commit comments