This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linux pthread_mutexattr_init?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]