paysages3d/src/system/Mutex.h

32 lines
416 B
C
Raw Normal View History

2013-10-20 13:01:57 +00:00
#ifndef MUTEX_H
#define MUTEX_H
#include "system_global.h"
2015-12-15 23:31:07 +00:00
#include <mutex>
2013-10-20 13:01:57 +00:00
namespace paysages {
namespace system {
2013-10-20 13:01:57 +00:00
/*!
* \brief System mutex
*/
2015-12-15 23:31:07 +00:00
class SYSTEMSHARED_EXPORT Mutex : private mutex {
public:
2013-10-20 13:01:57 +00:00
/*!
* \brief Create a new mutex
*/
Mutex();
inline void acquire() {
2015-12-15 23:31:07 +00:00
mutex::lock();
}
inline void release() {
2015-12-15 23:31:07 +00:00
mutex::unlock();
}
2013-10-20 13:01:57 +00:00
};
}
}
#endif // MUTEX_H