summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2009-01-13 22:41:16 +0000
committerDirk Engling <erdgeist@erdgeist.org>2009-01-13 22:41:16 +0000
commit6337649b08ae9487692c096ff1afcc9a0b042f64 (patch)
tree474673dedb22737f352e04144bd3684e57f1b6ac /ot_mutex.c
parentb2ca1649229ff3388fd71e713bdc133384fa2a05 (diff)
downloadopentracker-6337649b08ae9487692c096ff1afcc9a0b042f64.tar.gz
opentracker-6337649b08ae9487692c096ff1afcc9a0b042f64.zip
V6
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index 467886d..341eafd 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -80,8 +80,8 @@ ot_vector *mutex_bucket_lock( int bucket ) {
return all_torrents + bucket;
}
-ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash ) {
- int bucket = uint32_read_big( (char*)*hash ) >> OT_BUCKET_COUNT_SHIFT;
+ot_vector *mutex_bucket_lock_by_hash( ot_hash hash ) {
+ int bucket = uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT;
/* Can block */
mutex_bucket_lock( bucket );
@@ -96,8 +96,8 @@ void mutex_bucket_unlock( int bucket, int delta_torrentcount ) {
pthread_mutex_unlock( &bucket_mutex );
}
-void mutex_bucket_unlock_by_hash( ot_hash *hash, int delta_torrentcount ) {
- mutex_bucket_unlock( uint32_read_big( (char*)*hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount );
+void mutex_bucket_unlock_by_hash( ot_hash hash, int delta_torrentcount ) {
+ mutex_bucket_unlock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount );
}
size_t mutex_get_torrent_count( ) {
@@ -326,4 +326,4 @@ void mutex_deinit( ) {
byte_zero( all_torrents, sizeof( all_torrents ) );
}
-const char *g_version_mutex_c = "$Source: /home/cvsroot/opentracker/ot_mutex.c,v $: $Revision: 1.17 $\n";
+const char *g_version_mutex_c = "$Source: /home/cvsroot/opentracker/ot_mutex.c,v $: $Revision: 1.18 $\n";