diff options
Diffstat (limited to 'ot_mutex.h')
-rw-r--r-- | ot_mutex.h | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -17,17 +17,34 @@ void mutex_bucket_unlock( int bucket ); | |||
17 | void mutex_bucket_unlock_by_hash( ot_hash *hash ); | 17 | void mutex_bucket_unlock_by_hash( ot_hash *hash ); |
18 | 18 | ||
19 | typedef enum { | 19 | typedef 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 | |||
26 | typedef unsigned long ot_taskid; | 43 | typedef unsigned long ot_taskid; |
27 | 44 | ||
28 | int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype ); | 45 | int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype ); |
29 | void mutex_workqueue_canceltask( int64 socket ); | 46 | void mutex_workqueue_canceltask( int64 socket ); |
30 | ot_taskid mutex_workqueue_poptask( ot_tasktype tasktype ); | 47 | ot_taskid mutex_workqueue_poptask( ot_tasktype *tasktype ); |
31 | int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector ); | 48 | int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector ); |
32 | int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector ); | 49 | int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector ); |
33 | 50 | ||