sead
Loading...
Searching...
No Matches
seadCriticalSection.h
Go to the documentation of this file.
1#ifndef SEAD_CRITICAL_SECTION_H_
2#define SEAD_CRITICAL_SECTION_H_
3
4#ifdef cafe
5#include <cafe.h>
6#endif // cafe
7
8#include <heap/seadDisposer.h>
9
10namespace sead {
11
13{
14public:
16
17private:
20
21public:
22 ~CriticalSection() override;
23
24 void lock();
25 bool tryLock();
26 void unlock();
27
28protected:
29#ifdef cafe
31#else
32 #error "Unknown platform"
33#endif // cafe
34};
35#ifdef cafe
36static_assert(sizeof(CriticalSection) == 0x3C, "sead::CriticalSection size mismatch");
37#endif // cafe
38
39} // namespace sead
40
41#endif // SEAD_CRITICAL_SECTION_H_
Definition seadCriticalSection.h:13
const CriticalSection & operator=(const CriticalSection &)
~CriticalSection() override
Definition seadCriticalSectionCafe.cpp:12
bool tryLock()
Definition seadCriticalSectionCafe.cpp:21
void unlock()
Definition seadCriticalSectionCafe.cpp:26
CriticalSection(const CriticalSection &)
CriticalSection()
Definition seadCriticalSectionCafe.cpp:5
void lock()
Definition seadCriticalSectionCafe.cpp:16
Definition seadDisposer.h:12
Definition seadAssert.h:44