[CMD] Implement provisional support for the HIGHESTNUMANODENUMBER environment-like variable.

This variable is available only in Win7+, even if the underlying API
GetNumaHighestNodeNumber() is available in Win2003+
This commit is contained in:
Hermès Bélusca-Maïto 2020-07-12 23:37:50 +02:00
parent 04e0fe0652
commit 90159e1e51
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -948,6 +948,17 @@ GetEnvVarOrSpecial(LPCTSTR varName)
_itot(nErrorLevel, ret, 10);
return ret;
}
#if (NTDDI_VERSION >= NTDDI_WIN7)
/* Available in Win7+, even if the underlying API is available in Win2003+ */
/* %HIGHESTNUMANODENUMBER% */
else if (_tcsicmp(varName, _T("HIGHESTNUMANODENUMBER")) == 0)
{
ULONG NumaNodeNumber = 0;
GetNumaHighestNodeNumber(&NumaNodeNumber);
_itot(NumaNodeNumber, ret, 10);
return ret;
}
#endif
return NULL;
}