summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index 6edfaef..36de5ff 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -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
83ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash ) { 83ot_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
99void mutex_bucket_unlock_by_hash( ot_hash *hash, int delta_torrentcount ) { 99void 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
103size_t mutex_get_torrent_count( ) { 103size_t mutex_get_torrent_count( ) {