Linux pthread_mutexattr_init?

Mark Hounschell dmarkh@cfl.rr.com
Sat Jan 29 12:02:00 GMT 2005


I'm using glibc-2.3.3 on i386 platform running kernel 2.6.11. The man 
page for pthread_mutexattr_init indicates I can use the 
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP type of Mutex however the only 
type I can successfully build my program with is PTHREAD_MUTEX_INITIALIZER.

#include <pthread.h>
pthread_mutex_t Q_lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;

Causes the following error when I compile my pgm with gcc.

global.c:471: error: `PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' 
undeclared here (not in a function)


Is the man page incorrect? Does Linux/glibc support the 
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP? If so is there a trick to using 
other than the default PTHREAD_MUTEX_INITIALIZER type of mutex?

Thanks
Mark




More information about the Libc-alpha mailing list