diff options
Diffstat (limited to 'src/ot_mutex.h')
| -rw-r--r-- | src/ot_mutex.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ot_mutex.h b/src/ot_mutex.h new file mode 100644 index 0000000..d7ded92 --- /dev/null +++ b/src/ot_mutex.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> | ||
| 2 | It is considered beerware. Prost. Skol. Cheers or whatever. */ | ||
| 3 | |||
| 4 | #ifndef OT_MUTEX_H__ | ||
| 5 | #define OT_MUTEX_H__ | ||
| 6 | |||
| 7 | #include <sys/uio.h> | ||
| 8 | #include "trackerlogic.h" | ||
| 9 | |||
| 10 | void mutex_init(void); | ||
| 11 | void mutex_deinit(void); | ||
| 12 | |||
| 13 | ot_vector *mutex_bucket_lock(int bucket); | ||
| 14 | ot_vector *mutex_bucket_lock_by_hash(ot_hash const hash); | ||
| 15 | |||
| 16 | void mutex_bucket_unlock(int bucket, int delta_torrentcount); | ||
| 17 | void mutex_bucket_unlock_by_hash(ot_hash const hash, int delta_torrentcount); | ||
| 18 | |||
| 19 | size_t mutex_get_torrent_count(void); | ||
| 20 | |||
| 21 | #endif | ||
