diff options
author | erdgeist <> | 2007-11-06 01:25:36 +0000 |
---|---|---|
committer | erdgeist <> | 2007-11-06 01:25:36 +0000 |
commit | 3bf7878833de2551606d9cb98b13cf224eb2f6fc (patch) | |
tree | ff85f8059a311ca30e471017b8a7b40c58d7274d /mutex.c | |
parent | a6b83118123f6281d0cad123aebcf5d20be6dd68 (diff) |
Locks tested. Got the test routine wrong -> Fixed.
Diffstat (limited to 'mutex.c')
-rw-r--r-- | mutex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -53,7 +53,7 @@ static void bucket_remove( int bucket ) { | |||
53 | 53 | ||
54 | void mutex_bucket_lock( int bucket ) { | 54 | void mutex_bucket_lock( int bucket ) { |
55 | pthread_mutex_lock( &bucket_mutex ); | 55 | pthread_mutex_lock( &bucket_mutex ); |
56 | while( !bucket_check( bucket ) ) | 56 | while( bucket_check( bucket ) ) |
57 | pthread_cond_wait( &bucket_being_unlocked, &bucket_mutex ); | 57 | pthread_cond_wait( &bucket_being_unlocked, &bucket_mutex ); |
58 | bucket_push( bucket ); | 58 | bucket_push( bucket ); |
59 | pthread_mutex_unlock( &bucket_mutex ); | 59 | pthread_mutex_unlock( &bucket_mutex ); |