2011-12-09 17:06:08 +01:00
|
|
|
#ifndef MT_MT_H
|
|
|
|
#define MT_MT_H
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef QT_CORE_LIB
|
|
|
|
|
2011-12-15 20:35:03 +01:00
|
|
|
#include <QThread>
|
|
|
|
#include <QMutex>
|
|
|
|
#include <QSemaphore>
|
2011-12-14 18:39:38 +01:00
|
|
|
|
2014-05-07 11:04:34 +02:00
|
|
|
namespace mt {
|
2011-12-14 18:39:38 +01:00
|
|
|
typedef QThread thread;
|
|
|
|
typedef QMutex mutex;
|
|
|
|
typedef QMutexLocker mutexlocker;
|
|
|
|
typedef QSemaphore semaphore;
|
|
|
|
|
|
|
|
//cache.h, token.h
|
|
|
|
//QAtomicInt
|
|
|
|
|
|
|
|
}//namespace
|
|
|
|
|
2011-12-09 17:06:08 +01:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#include "base.h"
|
|
|
|
#include "mutex.h"
|
|
|
|
#include "rw_lock.h"
|
|
|
|
#include "semaphore.h"
|
|
|
|
#include "thread.h"
|
|
|
|
#include "scoped_mutex_lock.h"
|
|
|
|
#include "scoped_read_lock.h"
|
|
|
|
#include "scoped_write_lock.h"
|
|
|
|
|
2011-12-14 18:39:38 +01:00
|
|
|
namespace mt{
|
|
|
|
typedef scoped_mutex_lock mutexlocker;
|
|
|
|
}
|
2011-12-09 17:06:08 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // MT_MT_H
|