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, unsigned 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.
LONG | Lock variable |
void SpinlockLockWithCustomWait | ( | volatile LONG * | Lock, |
unsigned | MaximumWait ) |
Tries to get the lock and won't return until successfully get the lock.
LONG | Lock variable |
LONG | MaxWait Maximum wait (pause) count |
BOOLEAN SpinlockTryLock | ( | volatile LONG * | Lock | ) |
Tries to get the lock otherwise returns.
LONG | Lock variable |
void SpinlockUnlock | ( | volatile LONG * | Lock | ) |
Release the lock.
LONG | Lock variable |