19 #ifndef INCLUDE_RCF_THREADLIBRARY_HPP 20 #define INCLUDE_RCF_THREADLIBRARY_HPP 23 #include <shared_mutex> 28 #include <RCF/Export.hpp> 34 typedef std::thread Thread;
35 typedef std::mutex Mutex;
36 typedef std::unique_lock<std::mutex> Lock;
37 typedef std::condition_variable Condition;
38 typedef std::recursive_mutex RecursiveMutex;
39 typedef std::unique_lock<std::recursive_mutex> RecursiveLock;
41 typedef std::thread::id ThreadId;
42 typedef std::shared_timed_mutex ReadWriteMutex;
43 typedef std::shared_lock<std::shared_timed_mutex> ReadLock;
44 typedef std::unique_lock<std::shared_timed_mutex> WriteLock;
46 typedef std::shared_ptr<RecursiveLock> RecursiveLockPtr;
47 typedef std::shared_ptr<RecursiveMutex> RecursiveMutexPtr;
49 typedef std::shared_ptr<Thread> ThreadPtr;
50 typedef std::shared_ptr<ReadWriteMutex> ReadWriteMutexPtr;
51 typedef std::shared_ptr<Mutex> MutexPtr;
52 typedef std::shared_ptr<Lock> LockPtr;
53 typedef std::shared_ptr<Condition> ConditionPtr;
56 RCF_EXPORT ThreadId getCurrentThreadId();
59 RCF_EXPORT std::uint32_t getCurrentTimeMs();
64 static const unsigned int MaxTimeoutMs = (((
unsigned int)-1)/10)*9;
65 RCF_EXPORT std::uint32_t generateTimeoutMs(
unsigned int endTimeMs);
67 RCF_EXPORT Mutex & getRootMutex();
69 RCF_EXPORT
void sleepMs(std::uint32_t msec);
72 #endif // ! INCLUDE_RCF_THREADLIBRARY_HPP Definition: AmiIoHandler.hpp:24