summaryrefslogtreecommitdiffstats
path: root/src/H5TS.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-01-15 21:40:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-01-15 21:40:00 (GMT)
commit6bc94eb9597e14f723daa0bd2464e7c2859eb296 (patch)
tree60b4d5e78466cbaecdba964df959f6ad571458f9 /src/H5TS.c
parent1d038e08c18dd40e5157d8d91c56437abbf45413 (diff)
downloadhdf5-6bc94eb9597e14f723daa0bd2464e7c2859eb296.zip
hdf5-6bc94eb9597e14f723daa0bd2464e7c2859eb296.tar.gz
hdf5-6bc94eb9597e14f723daa0bd2464e7c2859eb296.tar.bz2
[svn-r14422] Description:
Clean up thread safety code a bit more... Tested on: Mac OS X/32 10.5.1 (amazon) w/threadsafe
Diffstat (limited to 'src/H5TS.c')
-rw-r--r--src/H5TS.c5
1 files 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);