|
HyperDbg Debugger
|
This is the implementation for custom spinlock. More...
#include "pch.h"Functions | |
| BOOLEAN | SpinlockTryLock (volatile LONG *Lock) |
| Tries to get the lock otherwise returns. | |
| VOID | SpinlockLock (volatile LONG *Lock) |
| Tries to get the lock and won't return until successfully get the lock. | |
| VOID | SpinlockLockWithCustomWait (volatile LONG *Lock, UINT32 MaximumWait) |
| Tries to get the lock and won't return until successfully get the lock. | |
| VOID | SpinlockUnlock (volatile LONG *Lock) |
| Release the lock. | |
This is the implementation for custom spinlock.
This implementation is derived from Hvpp by Petr Benes
Also, benefit of this implementation is that we can use it with STL lock guards, e.g.: std::lock_guard.
Look here for more information:
| VOID SpinlockLock | ( | volatile LONG * | Lock | ) |
Tries to get the lock and won't return until successfully get the lock.
| Lock | Lock variable |
| Lock | Lock variable |
Tries to get the lock and won't return until successfully get the lock.
| Lock | Lock variable |
| MaximumWait | Maximum wait (pause) count |
| Lock | Lock variable |
| MaximumWait | Maximum wait (pause) count |
Tries to get the lock otherwise returns.
| Lock | Lock variable |
| VOID SpinlockUnlock | ( | volatile LONG * | Lock | ) |
Release the lock.
| Lock | Lock variable |
| Lock | Lock variable |