]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Stats are tasks now, they also come in classes.
authorerdgeist <>
Sun, 18 Nov 2007 16:46:01 +0000 (16:46 +0000)
committererdgeist <>
Sun, 18 Nov 2007 16:46:01 +0000 (16:46 +0000)
ot_mutex.h

index 31a16efde3be62233adf58c1020f5d051b66f3ce..8c2e356e48640f673c20e24db40a2b666085d356 100644 (file)
@@ -17,17 +17,34 @@ void mutex_bucket_unlock( int bucket );
 void mutex_bucket_unlock_by_hash( ot_hash *hash );
 
 typedef enum {
-  OT_TASKTYPE_FULLSCRAPE,
-  OT_TASKTYPE_SYNC,
-  OT_TASKTYPE_DMEM,
+  TASK_STATS_CONNS                 = 0x0000,
+  TASK_STATS_PEERS                 = 0x0001,
+  TASK_STATS_TOP5                  = 0x0002,
+  TASK_STATS_TCP                   = 0x0003,
+  TASK_STATS_UDP                   = 0x0004,
+  TASK_STATS_FULLSCRAPE            = 0x0005,
+  TASK_STATS_TPB                   = 0x0006,
 
-  OT_TASKTYPE_DONE
+  TASK_STATS_SLASH24S              = 0x0100,
+
+  TASK_FULLSCRAPE                  = 0x0200, /* Default mode */
+  TASK_FULLSCRAPE_TPB_BINARY       = 0x0201,
+  TASK_FULLSCRAPE_TPB_ASCII        = 0x0202,
+  TASK_FULLSCRAPE_TPB_URLENCODED   = 0x0203,
+
+  TASK_SYNC                        = 0x0300,
+
+  TASK_DMEM                        = 0x0400,
+
+  TASK_DONE                        = 0x0f00,
+  TASK_MASK                        = 0xff00
 } ot_tasktype;
+
 typedef unsigned long ot_taskid;
 
 int       mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype );
 void      mutex_workqueue_canceltask( int64 socket );
-ot_taskid mutex_workqueue_poptask( ot_tasktype tasktype );
+ot_taskid mutex_workqueue_poptask( ot_tasktype *tasktype );
 int       mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iovec *iovector );
 int64     mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovector );