10 singleLock(pthread_mutex_t &m )
13 pthread_mutex_lock(&lock);
17 pthread_mutex_unlock(&lock);
23 friend class eRdLocker;
24 friend class eWrLocker;
25 pthread_rwlock_t m_lock;
26 eRdWrLock(eRdWrLock &);
30 pthread_rwlock_init(&m_lock, 0);
34 pthread_rwlock_destroy(&m_lock);
38 pthread_rwlock_rdlock(&m_lock);
42 pthread_rwlock_wrlock(&m_lock);
46 pthread_rwlock_unlock(&m_lock);
54 eRdLocker(eRdWrLock &m)
57 pthread_rwlock_rdlock(&m_lock.m_lock);
61 pthread_rwlock_unlock(&m_lock.m_lock);
69 eWrLocker(eRdWrLock &m)
72 pthread_rwlock_wrlock(&m_lock.m_lock);
76 pthread_rwlock_unlock(&m_lock.m_lock);
82 friend class eSingleLocker;
83 pthread_mutex_t m_lock;
84 eSingleLock(eSingleLock &);
88 pthread_mutex_init(&m_lock, 0);
92 pthread_mutex_destroy(&m_lock);
100 eSingleLocker(eSingleLock &m)
103 pthread_mutex_lock(&m_lock.m_lock);
107 pthread_mutex_unlock(&m_lock.m_lock);
113 pthread_mutex_t mutex;
119 void lock(int res=100);
120 void unlock(int res=100);
131 eLocker(eLock &lock, int res=100);
138 pthread_mutex_t mutex;