From 1c38dfed3806cf142ebb0b1be473c88c5b2ac929 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 10 Feb 2001 08:35:29 +0000 Subject: 2001-02-09 Ross Johnson * nonportable.c (pthread_mutex_setdefaulttype_np): New function for changing the default mutex type. * mutex.c (ptw32_InitializeCriticalSection): Removed. (ptw32_InitializeCriticalSection): Removed. (ptw32_InitializeCriticalSection): Removed. (ptw32_InitializeCriticalSection): Removed. (ptw32_InitializeCriticalSection): Removed. (pthread_mutex_init): Apply Thomas Pfaff's original patches; remove use of critical sections and adapt for different mutex types (see log entry for 2001-01-10). The disadvantage of using critical sections is that they don't appear to be sharable between processes. This implementation provides the opportunity to place mutex objects in shared memory. Thread priority determines the order in which waiting threads acquire the mutex although the implementation includes a mechanism to prevent threads hogging the mutex through successive unlock/lock operations. (pthread_mutex_destroy): Likewise. (pthread_mutex_lock): Likewise. (pthread_mutex_unlock): Likewise. (pthread_mutex_trylock): Likewise. * pthread.h (rand_r): Add redundant test of '_seed' arg to avoid "unused variable" warnings. Any good compiler will optimise the test away anyway. --- ChangeLog | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5a8c6a6..ea83e1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,14 +9,25 @@ (ptw32_InitializeCriticalSection): Removed. (ptw32_InitializeCriticalSection): Removed. (pthread_mutex_init): Apply Thomas Pfaff's original - patches but altered slightly to avoid using - critical sections and retain/adapt for different - mutex types (see log entry for 2001-01-10). + patches; remove use of critical sections and adapt + for different mutex types (see log entry for 2001-01-10). + The disadvantage of using critical sections is that + they don't appear to be sharable between processes. + This implementation provides the opportunity to place + mutex objects in shared memory. Thread priority + determines the order in which waiting threads acquire + the mutex although the implementation includes a + mechanism to prevent threads hogging the mutex through + successive unlock/lock operations. (pthread_mutex_destroy): Likewise. (pthread_mutex_lock): Likewise. (pthread_mutex_unlock): Likewise. (pthread_mutex_trylock): Likewise. + * pthread.h (rand_r): Add redundant test of '_seed' arg + to avoid "unused variable" warnings. Any good compiler + will optimise the test away anyway. + * Tagged repository 'exp-2001-02-09-passed'. 2001-02-09 Ross Johnson -- cgit v1.2.3