X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Foverall.h;h=caf062de7161598fa76e3ccc485ab790160c22a8;hp=64ee2cadb67eed9bace5fe758bfb36b4549f43b2;hb=47821a9eac31a40a1ed8c9c53553ac45e44ca8f7;hpb=7289d420ddc81d9975ed6d55dfdfd70dff2b2d48 diff --git a/src/overall.h b/src/overall.h index 64ee2ca..caf062d 100644 --- a/src/overall.h +++ b/src/overall.h @@ -60,10 +60,15 @@ #else #define pthread_self_tid() pthread_self() #endif +#ifdef PTHREAD_MUTEX_RECURSIVE_NP +#define PTHREAD_MUTEX_RECURSIVE_VAL PTHREAD_MUTEX_RECURSIVE_NP +#else +#define PTHREAD_MUTEX_RECURSIVE_VAL PTHREAD_MUTEX_RECURSIVE +#endif #define THREAD_MUTEX_INIT(var) { \ pthread_mutexattr_t mutex_attr; \ pthread_mutexattr_init(&mutex_attr);\ - pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_NP);\ + pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_VAL);\ pthread_mutex_init(&var, &mutex_attr); \ } #define THREAD_MUTEX_INIT_TYPE(var, type) { \