mirror of
https://github.com/wiiu-env/libmocha.git
synced 2024-11-08 21:15:06 +01:00
21 lines
318 B
C
21 lines
318 B
C
|
#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{};
|
||
|
};
|