mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-12-20 21:02:28 -05:00
18 lines
288 B
C
18 lines
288 B
C
|
#ifndef MXAUTOLOCK_H
|
||
|
#define MXAUTOLOCK_H
|
||
|
|
||
|
#include "mxcriticalsection.h"
|
||
|
|
||
|
#define AUTOLOCK(CS) MxAutoLock lock(&CS)
|
||
|
|
||
|
class MxAutoLock {
|
||
|
public:
|
||
|
MxAutoLock(MxCriticalSection* p_criticalSection);
|
||
|
~MxAutoLock();
|
||
|
|
||
|
private:
|
||
|
MxCriticalSection* m_criticalSection;
|
||
|
};
|
||
|
|
||
|
#endif // MXAUTOLOCK_H
|