blob: d7ded9240038ca08b4d5214074e073c7c5048437 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
It is considered beerware. Prost. Skol. Cheers or whatever. */
#ifndef OT_MUTEX_H__
#define OT_MUTEX_H__
#include <sys/uio.h>
#include "trackerlogic.h"
void mutex_init(void);
void mutex_deinit(void);
ot_vector *mutex_bucket_lock(int bucket);
ot_vector *mutex_bucket_lock_by_hash(ot_hash const hash);
void mutex_bucket_unlock(int bucket, int delta_torrentcount);
void mutex_bucket_unlock_by_hash(ot_hash const hash, int delta_torrentcount);
size_t mutex_get_torrent_count(void);
#endif
|