aboutsummaryrefslogtreecommitdiffstats
path: root/include/pthread.h
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2010-09-28 04:57:56 +0000
committerDavid Xu <davidxu@FreeBSD.org>2010-09-28 04:57:56 +0000
commitbbb64c2143215df373b4ce39af8fabd3b913b824 (patch)
treef872a487f24df43510c209db3f83597d42e3cbc0 /include/pthread.h
parent02285b4e884af3245fec92d55f456bc99e0fadd6 (diff)
downloadsrc-bbb64c2143215df373b4ce39af8fabd3b913b824.tar.gz
src-bbb64c2143215df373b4ce39af8fabd3b913b824.zip
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.
Notes
Notes: svn path=/head/; revision=213241
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 9edd48b791ce..56f6ef4de4eb 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