Re: [PATCH v5 0/1] MR824: ntoskrnl: Implement KeGetCurrentProcessorNumberEx
18 Sep
2022
18 Sep
'22
3:26 p.m.
You should only call `NtGetCurrentProcessorNumber()` once. Otherwise, the processor number can change if the thread is preempted and then re-scheduled to another processor. This leads to inconsistent values between the return value and the `process_number->Number` output.
It's not that `KeGetCurrentProcessorNumberEx()` will be highly useful, since the driver can't block scheduling by raising IRQL to DISPATCH_LEVEL. Still, it's better to at least return consistent values even if they are stale. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/824#note_8782
1188
Age (days ago)
1188
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jinoh Kang (@iamahuman)