libmocha/source/devoptab/FastLockWrapper.h

21 lines
318 B
C
Raw Normal View History

2022-06-11 17:58:39 +02:00
#pragma once
#include <coreinit/fastmutex.h>
class FastLockWrapper {
public:
FastLockWrapper() {
OSFastMutex_Init(&mutex, "generic lock");
}
void lock() {
OSFastMutex_Lock(&mutex);
}
void unlock() {
OSFastMutex_Unlock(&mutex);
}
private:
OSFastMutex mutex{};
};