dimanche 19 avril 2015

WaitForSingleObject and Deadlock

I read an article about synchronization on Windows.


Locks, Deadlocks, and Synchronization


It is said that normal kernel-mode APC delivery should be disabled by calling KeEnterCriticalRegion() before calling KeWaitXxx() to avoid deadlock.


I understood that. But AFAIK, there is no API like KeEnterCriticalRegion() for user application so WaitForSingleObject() seems to be unsafe for deadlock.


Otherwise, is KeEnterCriticalRegion() internally called in WaitForSingleObject() call?


Aucun commentaire:

Enregistrer un commentaire