improve functor locking.

This commit is contained in:
Vitor Santos Costa
2014-06-11 19:44:01 +01:00
parent 2400911db9
commit ec881b8e13
5 changed files with 65 additions and 55 deletions

View File

@@ -64,6 +64,15 @@ xIS_UNLOCKED(pthread_mutex_t *LOCK_VAR) {
#define WRITE_LOCK(X) pthread_rwlock_wrlock(&(X))
#define WRITE_UNLOCK(X) pthread_rwlock_unlock(&(X))
#define FUNC_READ_LOCK(F)
#define FUNC_READ_UNLOCK(F)
#define FUNC_WRITE_LOCK(F)
#define FUNC_WRITE_UNLOCK(F)
#define TRUE_FUNC_WRITE_LOCK(F) WRITE_LOCK((F)->FRWLock)
#define TRUE_FUNC_WRITE_UNLOCK(F) WRITE_UNLOCK((F)->FRWLock)
#if THREADS