This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Linux pthread_mutexattr_init?
- From: Mark Hounschell <dmarkh at cfl dot rr dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 29 Jan 2005 07:02:10 -0500
- Subject: Linux pthread_mutexattr_init?
- Reply-to: dmarkh at cfl dot rr dot com
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