From 6bc94eb9597e14f723daa0bd2464e7c2859eb296 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 15 Jan 2008 16:40:00 -0500 Subject: [svn-r14422] Description: Clean up thread safety code a bit more... Tested on: Mac OS X/32 10.5.1 (amazon) w/threadsafe --- src/H5TS.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/H5TS.c b/src/H5TS.c index 6d8ff64..a250067 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -191,7 +191,6 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) herr_t H5TS_mutex_unlock(H5TS_mutex_t *mutex) { - unsigned lock_count; /* Mutex's lock count */ herr_t ret_value; /* Return value */ ret_value = pthread_mutex_lock(&mutex->atomic_lock); @@ -199,11 +198,11 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) if(ret_value) return ret_value; - lock_count = --mutex->lock_count; + mutex->lock_count--; ret_value = pthread_mutex_unlock(&mutex->atomic_lock); - if(lock_count == 0) { + if(mutex->lock_count == 0) { int err; err = pthread_cond_signal(&mutex->cond_var); -- cgit v0.12