HyperDbg Debugger
Toggle main menu visibility
Loading...
Searching...
No Matches
Spinlock.h
Go to the documentation of this file.
1
12
#pragma once
13
15
// Spinlock Functions //
17
18
BOOLEAN
19
SpinlockTryLock
(
volatile
LONG
* Lock);
20
21
BOOLEAN
22
SpinlockCheckLock
(
volatile
LONG
* Lock);
23
24
VOID
25
SpinlockLock
(
volatile
LONG
* Lock);
26
27
VOID
28
SpinlockLockWithCustomWait
(
volatile
LONG
* Lock,
UINT32
MaxWait);
29
30
VOID
31
SpinlockUnlock
(
volatile
LONG
* Lock);
32
33
VOID
34
SpinlockInterlockedCompareExchange
(
35
LONG
volatile
* Destination,
36
LONG
Exchange,
37
LONG
Comperand);
38
39
#define ScopedSpinlock(LockObject, CodeToRun) \
40
MetaScopedExpr(SpinlockLock(&LockObject), \
41
SpinlockUnlock(&LockObject), \
42
CodeToRun)
SpinlockLockWithCustomWait
VOID SpinlockLockWithCustomWait(volatile LONG *Lock, UINT32 MaxWait)
Tries to get the lock and won't return until successfully get the lock.
Definition
Spinlock.c:128
SpinlockTryLock
BOOLEAN SpinlockTryLock(volatile LONG *Lock)
Tries to get the lock otherwise returns.
Definition
Spinlock.c:41
SpinlockLock
VOID SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition
Spinlock.c:53
SpinlockUnlock
VOID SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition
Spinlock.c:162
SpinlockInterlockedCompareExchange
VOID SpinlockInterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG Comperand)
Interlocked spinlock that tries to change the value and makes sure that it changed the target value.
Definition
Spinlock.c:90
SpinlockCheckLock
BOOLEAN SpinlockCheckLock(volatile LONG *Lock)
Check the lock without changing the state.
Definition
Spinlock.c:174
BOOLEAN
UCHAR BOOLEAN
Definition
BasicTypes.h:35
LONG
long LONG
Definition
BasicTypes.h:28
UINT32
unsigned int UINT32
Definition
BasicTypes.h:54
hyperdbg
include
components
spinlock
header
Spinlock.h
Generated by
1.17.0