diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2020-07-04 18:53:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-05 03:53:44 +0200 |
commit | 04b40609276c15b59df065659a0a8ce41b316cef (patch) | |
tree | 0d46d8f4d1557e88465d51cf5625362fbaf0e26f | |
parent | 2a44280b2e4a6bcb3ccc0b622acea3305807e175 (diff) | |
download | psutil-04b40609276c15b59df065659a0a8ce41b316cef.tar.gz |
Fix signature of callback function for load avg (#1781)
It looks like `WAITORTIMERCALLBACK` should have two arguments, the void* as well as a boolean representing whether the wait time expired: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms687066(v=vs.85)
We were previously missing the boolean which might lead to a crash on 32-bit systems, but even if not this should be corrected.
-rw-r--r-- | psutil/arch/windows/wmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/psutil/arch/windows/wmi.c b/psutil/arch/windows/wmi.c index 42a70df7..0a1fb891 100644 --- a/psutil/arch/windows/wmi.c +++ b/psutil/arch/windows/wmi.c @@ -30,7 +30,7 @@ double load_avg_5m = 0; double load_avg_15m = 0; -VOID CALLBACK LoadAvgCallback(PVOID hCounter) { +VOID CALLBACK LoadAvgCallback(PVOID hCounter, BOOLEAN timedOut) { PDH_FMT_COUNTERVALUE displayValue; double currentLoad; PDH_STATUS err; |