paysages3d/src/system/Mutex.h

29 lines
364 B
C
Raw Permalink Normal View History

#pragma once
2013-10-20 13:01:57 +00:00
#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
2016-01-03 18:21:23 +00:00
/**
* System mutex
2013-10-20 13:01:57 +00:00
*/
2015-12-15 23:31:07 +00:00
class SYSTEMSHARED_EXPORT Mutex : private mutex {
public:
2016-01-03 18:21:23 +00:00
/**
* Create a new mutex
2013-10-20 13:01:57 +00:00
*/
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
};
}
}