summaryrefslogtreecommitdiff
path: root/ot_mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'ot_mutex.h')
-rw-r--r--ot_mutex.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/ot_mutex.h b/ot_mutex.h
index 31a16ef..8c2e356 100644
--- a/ot_mutex.h
+++ b/ot_mutex.h
@@ -17,17 +17,34 @@ void mutex_bucket_unlock( int bucket );
17void mutex_bucket_unlock_by_hash( ot_hash *hash ); 17void mutex_bucket_unlock_by_hash( ot_hash *hash );
18 18
19typedef enum { 19typedef enum {
20 OT_TASKTYPE_FULLSCRAPE, 20 TASK_STATS_CONNS = 0x0000,
21 OT_TASKTYPE_SYNC, 21 TASK_STATS_PEERS = 0x0001,
22 OT_TASKTYPE_DMEM, 22 TASK_STATS_TOP5 = 0x0002,
23 TASK_STATS_TCP = 0x0003,
24 TASK_STATS_UDP = 0x0004,
25 TASK_STATS_FULLSCRAPE = 0x0005,
26 TASK_STATS_TPB = 0x0006,
23 27
24 OT_TASKTYPE_DONE 28 TASK_STATS_SLASH24S = 0x0100,
29
30 TASK_FULLSCRAPE = 0x0200, /* Default mode */
31 TASK_FULLSCRAPE_TPB_BINARY = 0x0201,
32 TASK_FULLSCRAPE_TPB_ASCII = 0x0202,
33 TASK_FULLSCRAPE_TPB_URLENCODED = 0x0203,
34
35 TASK_SYNC = 0x0300,
36
37 TASK_DMEM = 0x0400,
38
39 TASK_DONE = 0x0f00,
40 TASK_MASK = 0xff00
25} ot_tasktype; 41} ot_tasktype;
42
26typedef unsigned long ot_taskid; 43typedef unsigned long ot_taskid;
27 44
28int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype ); 45int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype );
29void mutex_workqueue_canceltask( int64 socket ); 46void mutex_workqueue_canceltask( int64 socket );
30ot_taskid mutex_workqueue_poptask( ot_tasktype tasktype ); 47ot_taskid mutex_workqueue_poptask( ot_tasktype *tasktype );
31int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector ); 48int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector );
32int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector ); 49int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector );
33 50