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:
authorThomas Pfaff <tpfaff@gmx.net>2003-03-18 22:39:21 +0300
committerThomas Pfaff <tpfaff@gmx.net>2003-03-18 22:39:21 +0300
commit2ff03dc2e01dbf0525ad32960612b5df0c6cb9f8 (patch)
treec8e7b4bceb8f6f175bb1c4bf6f34bbf331cec7e3 /winsup/cygwin/include
parentdcd350f0ec963e59b91118ae437e5f783a283e94 (diff)
* include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
* thread.cc: Remove errno.h include. (pthread::precreate): Change internal mutex type to normal. (pthread_mutex::canBeUnlocked): Implement. (pthread_mutex::pthread_mutex): Initialize lock_counter with 0. (pthread_mutex::Lock): Rename to _Lock. Add self parameter. Change lock_counter logic. Update SetOwner call. (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter. Change lock_counter logic. Update SetOwner call. (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter. Change lock_counter logic. (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call. (pthread_mutex::SetOwner): Move to thread.h as inline. (pthread_mutex::LockRecursive): Ditto. (pthread_mutex::fixup_after_fork): Change lock_counter logic. (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid types check. * thread.h: Include errno.h and limits.h. (MUTEX_LOCK_COUNTER_INITIAL): Remove. (MUTEX_OWNER_ANONYMOUS): New define. (pthread_mutex::canBeUnlocked): New static method. (pthread_mutex::lock_counter): Change type to unsigned long. (pthread_mutex::GetPthreadSelf): New method. (pthread_mutex::Lock): Call _Lock with pthread_self pointer. (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer. (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer. (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer. (pthread_mutex::SetOwner): Moved from thread.cc as inline. (pthread_mutex::LockRecursive): Ditto. (pthread_mutex::_Lock): New method. (pthread_mutex::_TryLock): New method. (pthread_mutex::_UnLock): New method. (pthread_mutex::_Destroy): New method.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/pthread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
index bc7db4d39..7ac683487 100644
--- a/winsup/cygwin/include/pthread.h
+++ b/winsup/cygwin/include/pthread.h
@@ -52,6 +52,7 @@ extern "C"
#define PTHREAD_INHERIT_SCHED 0
#define PTHREAD_MUTEX_RECURSIVE 0
#define PTHREAD_MUTEX_ERRORCHECK 1
+#define PTHREAD_MUTEX_NORMAL 2
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK
/* this should be too low to ever be a valid address */
#define PTHREAD_MUTEX_INITIALIZER (pthread_mutex_t)20