error: 'PTHREAD_MUTEX_RECURSIVE' undeclared
Metuki Sabhe
sabhe.metuki@gmail.com
Mon Mar 10 19:16:00 GMT 2008
Hello,
I encounter the above-mentioned error when trying to do a simple
pthread_mutexattr_settype( &mutex_attr, PTHREAD_MUTEX_RECURSIVE);
(yes, <pthread.h> is included).
Any idea why ?
Reading pthread.h I have found out that PTHREAD_MUTEX_RECURSIVE is declared
only if some weird __USE_UNIX98 macro is defined.
and I don't want to define weird macros. But, I also saw that
PTHREAD_MUTEX_RECURSIVE
actually equals to a PTHREAD_MUTEX_RECURSIVE_NP macro. what is this macro ?
It is not mentioned in the man page. I tried it, it compiles, and the
code actually works
(I get the desired recursive behavior).
Can someone please shed some light here ?
Thank you very much,
Metuki
More information about the Libc-alpha
mailing list