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