diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-09-28 04:57:56 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-09-28 04:57:56 +0000 |
commit | f329bc965ca427c52c33f2fac97475453de89481 (patch) | |
tree | f872a487f24df43510c209db3f83597d42e3cbc0 /include | |
parent | 2451920d9872c75b7c2c7d3c85890a25ed2ac3c0 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | include/pthread.h | 2 |
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 |