2014-08-18 13:20:04 +00:00
|
|
|
#ifndef SEMAPHORE_H
|
|
|
|
#define SEMAPHORE_H
|
|
|
|
|
|
|
|
#include "system_global.h"
|
|
|
|
|
|
|
|
#include <QSemaphore>
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
namespace paysages {
|
|
|
|
namespace system {
|
2014-08-18 13:20:04 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
class Semaphore : private QSemaphore {
|
|
|
|
public:
|
2014-08-18 13:20:04 +00:00
|
|
|
Semaphore(int resources);
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
inline void acquire() {
|
|
|
|
QSemaphore::acquire();
|
|
|
|
}
|
|
|
|
inline void release() {
|
|
|
|
QSemaphore::release();
|
|
|
|
}
|
2014-08-18 13:20:04 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SEMAPHORE_H
|