diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-27 13:40:23 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-27 13:40:23 +0100 |
commit | cb666693389ca50e86406c03f36c736702ee1dcf (patch) | |
tree | f055975fde2986e57e12a26acdd5656f0d883af5 | |
parent | f5621b6eb353d675e25b3aeb6194a6ff18a4268a (diff) | |
download | psutil-cb666693389ca50e86406c03f36c736702ee1dcf.tar.gz |
remove win dead code
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
-rw-r--r-- | psutil/_psutil_windows.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index 7a3ab329..13cf58c4 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -44,35 +44,6 @@ static PyObject *TimeoutAbandoned; /* - * Return the number of logical, active CPUs. Return 0 if undetermined. - * See discussion at: https://bugs.python.org/issue33166#msg314631 - */ -unsigned int -psutil_get_num_cpus(int fail_on_err) { - unsigned int ncpus = 0; - - // Minimum requirement: Windows 7 - if (GetActiveProcessorCount != NULL) { - ncpus = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); - if ((ncpus == 0) && (fail_on_err == 1)) { - PyErr_SetFromWindowsErr(0); - } - } - else { - psutil_debug("GetActiveProcessorCount() not available; " - "using GetSystemInfo()"); - ncpus = (unsigned int)PSUTIL_SYSTEM_INFO.dwNumberOfProcessors; - if ((ncpus <= 0) && (fail_on_err == 1)) { - PyErr_SetString( - PyExc_RuntimeError, - "GetSystemInfo() failed to retrieve CPU count"); - } - } - return ncpus; -} - - -/* * Return a Python float representing the system uptime expressed in seconds * since the epoch. */ |