summaryrefslogtreecommitdiff
path: root/ot_mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'ot_mutex.h')
-rw-r--r--ot_mutex.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ot_mutex.h b/ot_mutex.h
index 2d30c69..31a16ef 100644
--- a/ot_mutex.h
+++ b/ot_mutex.h
@@ -4,6 +4,9 @@
4#ifndef __OT_MUTEX_H__ 4#ifndef __OT_MUTEX_H__
5#define __OT_MUTEX_H__ 5#define __OT_MUTEX_H__
6 6
7#include "ot_iovec.h"
8#include "io.h"
9
7void mutex_init( ); 10void mutex_init( );
8void mutex_deinit( ); 11void mutex_deinit( );
9 12
@@ -13,4 +16,19 @@ ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash );
13void mutex_bucket_unlock( int bucket ); 16void mutex_bucket_unlock( int bucket );
14void mutex_bucket_unlock_by_hash( ot_hash *hash ); 17void mutex_bucket_unlock_by_hash( ot_hash *hash );
15 18
19typedef enum {
20 OT_TASKTYPE_FULLSCRAPE,
21 OT_TASKTYPE_SYNC,
22 OT_TASKTYPE_DMEM,
23
24 OT_TASKTYPE_DONE
25} ot_tasktype;
26typedef unsigned long ot_taskid;
27
28int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype );
29void mutex_workqueue_canceltask( int64 socket );
30ot_taskid mutex_workqueue_poptask( ot_tasktype tasktype );
31int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector );
32int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector );
33
16#endif 34#endif