summaryrefslogtreecommitdiffstats
path: root/include/pthread.h
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-28 04:57:56 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-28 04:57:56 +0000
commitf329bc965ca427c52c33f2fac97475453de89481 (patch)
treef872a487f24df43510c209db3f83597d42e3cbc0 /include/pthread.h
parent2451920d9872c75b7c2c7d3c85890a25ed2ac3c0 (diff)
downloadFreeBSD-src-f329bc965ca427c52c33f2fac97475453de89481.zip
FreeBSD-src-f329bc965ca427c52c33f2fac97475453de89481.tar.gz
In current code, statically initialized and destroyed object have
same null value, the code can not distinguish between them, to fix the problem, now a destroyed object is assigned to a non-null value, and it will be rejected by some pthread functions. PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that adaptive mutex can be statically initialized correctly.
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/pthread.h b/include/pthread.h
index 9edd48b..56f6ef4 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -98,7 +98,7 @@
* Static initialization values.
*/
#define PTHREAD_MUTEX_INITIALIZER NULL
-#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP NULL
+#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ((pthread_mutex_t)1)
#define PTHREAD_COND_INITIALIZER NULL
#define PTHREAD_RWLOCK_INITIALIZER NULL
OpenPOWER on IntegriCloud