summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-05 16:30:02 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-05 16:30:02 +0200
commit524d78d6c7552cd4c44be7cea1ccc7cdbb11b490 (patch)
treefb2de9f3255e9e3a05cf91438eeba7d5c4265251 /ot_mutex.c
parent64e25b681c4668577fa54ead3215442ad707440d (diff)
constify
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index 88a7af8..6457f29 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -36,8 +36,8 @@ ot_vector *mutex_bucket_lock( int bucket ) {
36 return all_torrents + bucket; 36 return all_torrents + bucket;
37} 37}
38 38
39ot_vector *mutex_bucket_lock_by_hash( ot_hash hash ) { 39ot_vector *mutex_bucket_lock_by_hash( ot_hash const hash ) {
40 return mutex_bucket_lock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT ); 40 return mutex_bucket_lock( uint32_read_big( (const char*)hash ) >> OT_BUCKET_COUNT_SHIFT );
41} 41}
42 42
43void mutex_bucket_unlock( int bucket, int delta_torrentcount ) { 43void mutex_bucket_unlock( int bucket, int delta_torrentcount ) {
@@ -45,7 +45,7 @@ void mutex_bucket_unlock( int bucket, int delta_torrentcount ) {
45 g_torrent_count += delta_torrentcount; 45 g_torrent_count += delta_torrentcount;
46} 46}
47 47
48void mutex_bucket_unlock_by_hash( ot_hash hash, int delta_torrentcount ) { 48void mutex_bucket_unlock_by_hash( ot_hash const hash, int delta_torrentcount ) {
49 mutex_bucket_unlock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount ); 49 mutex_bucket_unlock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount );
50} 50}
51 51