|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00019 #ifndef ANDROMETA_M_RW_MUTEX_H 00020 #define ANDROMETA_M_RW_MUTEX_H 00021 00022 #include <cstddef> 00023 00024 namespace Meta{ 00025 00035 class MRWMutex{ 00036 public: 00037 00041 MRWMutex(); 00042 00046 ~MRWMutex(); 00047 00051 void lock(); 00052 00056 bool tryLock(); 00057 00061 void unlock(); 00062 00068 void readLock(); 00069 00075 void writeLock(); 00076 00083 bool tryReadLock(); 00084 00091 bool tryWriteLock(); 00092 00093 friend class MRWMutex_; 00094 00095 private: 00096 MRWMutex& operator=(const MRWMutex&); 00097 MRWMutex(const MRWMutex&); 00098 00099 class MRWMutex_* x_; 00100 }; 00101 00102 } // end namespace Meta 00103 00104 #endif // ANDROMETA_M_RW_MUTEX_H
1.7.6.1