mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-17 17:55:12 +00:00
PTHREAD_MUTEX_RECURSIVE_NP is a enum not macro
This commit is contained in:
parent
f44b61c403
commit
3e655bad3b
@ -619,13 +619,7 @@ FdEntity::FdEntity(const char* tpath, const char* cpath)
|
|||||||
try{
|
try{
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
#ifdef PTHREAD_MUTEX_RECURSIVE_NP
|
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); // recursive mutex
|
|
||||||
#elif PTHREAD_MUTEX_RECURSIVE
|
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); // recursive mutex
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); // recursive mutex
|
||||||
#else
|
|
||||||
#error "Either PTHREAD_MUTEX_RECURSIVE_NP or PTHREAD_MUTEX_RECURSIVE must be defined."
|
|
||||||
#endif
|
|
||||||
pthread_mutex_init(&fdent_lock, &attr);
|
pthread_mutex_init(&fdent_lock, &attr);
|
||||||
is_lock_init = true;
|
is_lock_init = true;
|
||||||
}catch(exception& e){
|
}catch(exception& e){
|
||||||
|
Loading…
Reference in New Issue
Block a user