What is the purpose of the WaitReason parameter on KeWaitForSingleObject ()?

MSDN docs do not explain what happens for the various options here (although they are pretty clear in the 'WaitMode' parameter). Why should I select "Executive" over "UserRequest" or many other parameters in KWAIT_REASON?

+3
source share
1 answer

My understanding is that this value is set in the invoking thread _KTHREAD :: WaitReason field and that it exists strictly for diagnostic purposes.

_KTHREAD :: WaitReasonis is consumed and displayed by various Windows diagnostic services.

+1
source

Source: https://habr.com/ru/post/1791358/


All Articles