mirror of https://github.com/zeldaret/tp.git
20 lines
371 B
C++
20 lines
371 B
C++
#ifndef JASCRITICALSECTION_H
|
|
#define JASCRITICALSECTION_H
|
|
|
|
#include <dolphin/os.h>
|
|
|
|
/**
|
|
* @ingroup jsystem-jaudio
|
|
*
|
|
*/
|
|
class JASCriticalSection {
|
|
public:
|
|
JASCriticalSection() { mInterruptState = OSDisableInterrupts(); };
|
|
~JASCriticalSection() { OSRestoreInterrupts(mInterruptState); };
|
|
|
|
private:
|
|
u32 mInterruptState;
|
|
};
|
|
|
|
#endif /* JASCRITICALSECTION_H */
|