diff options
Diffstat (limited to 'ot_mutex.c')
-rw-r--r-- | ot_mutex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -80,8 +80,8 @@ ot_vector *mutex_bucket_lock( int bucket ) { | |||
80 | return all_torrents + bucket; | 80 | return all_torrents + bucket; |
81 | } | 81 | } |
82 | 82 | ||
83 | ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash ) { | 83 | ot_vector *mutex_bucket_lock_by_hash( ot_hash hash ) { |
84 | int bucket = uint32_read_big( (char*)*hash ) >> OT_BUCKET_COUNT_SHIFT; | 84 | int bucket = uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT; |
85 | 85 | ||
86 | /* Can block */ | 86 | /* Can block */ |
87 | mutex_bucket_lock( bucket ); | 87 | mutex_bucket_lock( bucket ); |
@@ -96,8 +96,8 @@ void mutex_bucket_unlock( int bucket, int delta_torrentcount ) { | |||
96 | pthread_mutex_unlock( &bucket_mutex ); | 96 | pthread_mutex_unlock( &bucket_mutex ); |
97 | } | 97 | } |
98 | 98 | ||
99 | void mutex_bucket_unlock_by_hash( ot_hash *hash, int delta_torrentcount ) { | 99 | void mutex_bucket_unlock_by_hash( ot_hash hash, int delta_torrentcount ) { |
100 | mutex_bucket_unlock( uint32_read_big( (char*)*hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount ); | 100 | mutex_bucket_unlock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount ); |
101 | } | 101 | } |
102 | 102 | ||
103 | size_t mutex_get_torrent_count( ) { | 103 | size_t mutex_get_torrent_count( ) { |