From 3208cee87389dbe7479e44208f8c0a4f8725fae8 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 12 Feb 2001 08:28:05 +0000 Subject: Revamp experimental mutex routines again to make more atomic and cancel-safe. --- ChangeLog | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ea83e1c..bbbdf93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2001-02-12 Ross Johnson + + * mutex.c (pthread_mutex_init): Revamped yet again. + (pthread_mutex_destroy): Likewise. + (pthread_mutex_lock): Likewise. + (pthread_mutex_unlock): Likewise. + (pthread_mutex_trylock): Likewise. + We now guarantee exclusive access to the pthread_mutex_t + (ie. the pointer to the pthread_mutex_t_ struct) and + therefore also to the mutex object whether initialised + or not. We also ensure that mutex objects are not + corrupted by a thread when it is asynchronously + canceled (by temporarily setting the thread to DEFERRED + cancelation mode). This is to say that the mutex routines + now manipulate pthread_mutex_t objects atomically and + are cancelation-safe. + (ptw32_mutex_check_need_init): Removed - no longer needed. + * implement.h (PTW32_OBJECT_GET): New macro to + wait and exclusively acquire a pthread_mutex_t object. + (PTW32_OBJECT_SET): New macro to set and release a + pthread_mutex_t object. + (PTW32_OBJECT_TRYGET): New macro to check if another + thread is accessing a pthread_mutex_t object and either + gives exclusive access or returns immediately. + (PTW32_OBJECT_IN_USE): New constant for exclusive access to + pthread_mutex_t objects. + 2001-02-09 Ross Johnson * nonportable.c (pthread_mutex_setdefaulttype_np): New -- cgit v1.2.3