diff options
| -rw-r--r-- | ot_mutex.c | 3 |
1 files changed, 0 insertions, 3 deletions
| @@ -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 */ |
| 31 | static _Atomic size_t g_torrent_count; | 31 | static _Atomic size_t g_torrent_count; |
| 32 | 32 | ||
| 33 | /* Self pipe from opentracker.c */ | ||
| 34 | |||
| 35 | ot_vector *mutex_bucket_lock(int bucket) { | 33 | ot_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 */ | ||
| 70 | void mutex_deinit(void) { | 67 | void 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) |
