Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-06-11 08:56:36 +0400
committerChristopher Faylor <me@cgf.cx>2005-06-11 08:56:36 +0400
commit8556456790cc823243ae05435af07dc1bc5b2f2e (patch)
tree8eacf67b67c1d0ce09d0faa4a27aeb532afcf506 /winsup/cygwin/include/pthread.h
parentb4177338e194ad5fae4241eab9c85b9ae6554d6b (diff)
* include/pthread.h: Change PTHREAD_MUTEX_DEFAULT to PTHREAD_MUTEX_NORMAL.
Revert PTHREAD_MUTEX_INITIALIZER to PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP since that is actually closer to what linux does. * thread.h (cw_cancel_action): New enum. (cancelable_wait): Use cw_cancel_action as third argument. * thread.cc (cancelable_wait): Ditto. Don't wait for cancel if cancel_action == cw_no_cancel. (pthread::create): Don't wait for cancel event since that is racy. (pthread_mutex::pthread_mutex): Set default to PTHREAD_MUTEX_ERRORCHECK. (pthread_mutexattr::pthread_mutexattr): Ditto. (pthread_mutex::_lock): Tell cancelable_wait not to wait for cancellation event. (semaphore::_timedwait): Accommodate change in cancelable_wait args. (pthread::join): Ditto.
Diffstat (limited to 'winsup/cygwin/include/pthread.h')
-rw-r--r--winsup/cygwin/include/pthread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
index 37a3cf6a1..1a034a0ae 100644
--- a/winsup/cygwin/include/pthread.h
+++ b/winsup/cygwin/include/pthread.h
@@ -53,12 +53,12 @@ extern "C"
#define PTHREAD_MUTEX_RECURSIVE 0
#define PTHREAD_MUTEX_ERRORCHECK 1
#define PTHREAD_MUTEX_NORMAL 2
-#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK
+#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
/* this should be too low to ever be a valid address */
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (pthread_mutex_t)18
#define PTHREAD_NORMAL_MUTEX_INITIALIZER_NP (pthread_mutex_t)19
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20
-#define PTHREAD_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER_NP
+#define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
#define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
#define PTHREAD_PRIO_INHERIT
#define PTHREAD_PRIO_NONE