> Quick question,
>
> Does anyone on here know what the equivelant macro for
> PTHREAD_RECURSIVE_MUTEX_INITALIZER_NP is under freebsd? I cant find
> anything like this in pthread.h, and Im wondering without it what do I use
> to initialize a recursive mutex.
>
> Any advice would be appreciated
Well, the '_NP' in PTHREAD_RECURSIVE_MUTEX_INITALIZER_NP should give
you some idea. Hint: Non-portable.
There is no PTHREAD_RECURSIVE_MUTEX_INITALIZER_NP in the POSIX standard,
and one shouldn't rely on its use. Recursive mutexes can be easily done
by the application, just by wrapping them in a structure with an owner
and count.
That said, SUSv2 does provide a recursive mutex (unlike POSIX). To
use a recursive mutex under FreeBSD, use:
pthread_mutex_settype(PTHREAD_MUTEX_RECURSIVE);
Dan Eischen
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message