mirror of
https://github.com/BeneficialCode/WinArk.git
synced 2026-10-18 21:51:35 +08:00
14 lines
245 B
C++
14 lines
245 B
C++
#include "pch.h"
|
|
#include "Mutex.h"
|
|
|
|
void Mutex::Init() {
|
|
KeInitializeMutex(&_mutex,0);
|
|
}
|
|
|
|
void Mutex::Lock() {
|
|
KeWaitForSingleObject(&_mutex, Executive, KernelMode, FALSE, nullptr);
|
|
}
|
|
|
|
void Mutex::Unlock() {
|
|
KeReleaseMutex(&_mutex, FALSE);
|
|
} |