wut/libraries/wutdevoptab/MutexWrapper.h
GaryOderNichts 2c98cc91aa
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
Run clang-format
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
2025-06-05 11:06:04 +01:00

32 lines
358 B
C++

#pragma once
#include <coreinit/mutex.h>
#include "coreinit/cache.h"
class MutexWrapper
{
public:
MutexWrapper() = default;
void
init(const char *name)
{
OSInitMutexEx(&mutex, name);
}
void
lock()
{
OSLockMutex(&mutex);
}
void
unlock()
{
OSUnlockMutex(&mutex);
}
private:
OSMutex mutex{};
};