summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index d856d5f..9b3fd24 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -30,8 +30,6 @@ static pthread_mutex_t bucket_mutex[OT_BUCKET_COUNT];
30 threads out of that one bucket, so the counter needs its own protection */ 30 threads out of that one bucket, so the counter needs its own protection */
31static _Atomic size_t g_torrent_count; 31static _Atomic size_t g_torrent_count;
32 32
33/* Self pipe from opentracker.c */
34
35ot_vector *mutex_bucket_lock(int bucket) { 33ot_vector *mutex_bucket_lock(int bucket) {
36 pthread_mutex_lock(bucket_mutex + bucket); 34 pthread_mutex_lock(bucket_mutex + bucket);
37 return all_torrents + bucket; 35 return all_torrents + bucket;
@@ -66,7 +64,6 @@ void mutex_init(void) {
66 memset(all_torrents, 0, sizeof(all_torrents)); 64 memset(all_torrents, 0, sizeof(all_torrents));
67} 65}
68 66
69/* Let every worker parked on the queue see that the tracker is stopping */
70void mutex_deinit(void) { 67void mutex_deinit(void) {
71 size_t i; 68 size_t i;
72 for (i = 0; i < OT_BUCKET_COUNT; ++i) 69 for (i = 0; i < OT_BUCKET_COUNT; ++i)