diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-01-15 21:40:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-01-15 21:40:00 (GMT) |
commit | 6bc94eb9597e14f723daa0bd2464e7c2859eb296 (patch) | |
tree | 60b4d5e78466cbaecdba964df959f6ad571458f9 /src | |
parent | 1d038e08c18dd40e5157d8d91c56437abbf45413 (diff) | |
download | hdf5-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')
-rw-r--r-- | src/H5TS.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |