aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_operations.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-08-19 14:13:19 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-08-19 14:13:19 +0000
commit9dd0824b40e7afeaf948a564d544b384db12cadf (patch)
tree4d98c8d27669e8eca6259a9601e32fddfa67e39c /src/testbed/testbed_api_operations.h
parentd4051630bbc5f521142f302baad60212b75f8b7f (diff)
downloadgnunet-9dd0824b40e7afeaf948a564d544b384db12cadf.tar.gz
gnunet-9dd0824b40e7afeaf948a564d544b384db12cadf.zip
fix 2893: Move adaptive parallelisation mechanism to operation queues
Diffstat (limited to 'src/testbed/testbed_api_operations.h')
-rw-r--r--src/testbed/testbed_api_operations.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/testbed/testbed_api_operations.h b/src/testbed/testbed_api_operations.h
index b6885e69a..c44325307 100644
--- a/src/testbed/testbed_api_operations.h
+++ b/src/testbed/testbed_api_operations.h
@@ -38,14 +38,35 @@ struct OperationQueue;
38 38
39 39
40/** 40/**
41 * The type of operation queue
42 */
43enum OperationQueueType
44{
45 /**
46 * Operation queue which permits a fixed maximum number of operations to be
47 * active at any time
48 */
49 OPERATION_QUEUE_TYPE_FIXED,
50
51 /**
52 * Operation queue which adapts the number of operations to be active based on
53 * the operation completion times of previously executed operation in it
54 */
55 OPERATION_QUEUE_TYPE_ADAPTIVE
56};
57
58
59/**
41 * Create an operation queue. 60 * Create an operation queue.
42 * 61 *
43 * @param max_active maximum number of operations in this 62 * @param type the type of operation queue
44 * queue that can be active in parallel at the same time 63 * @param max_active maximum number of operations in this queue that can be
64 * active in parallel at the same time.
45 * @return handle to the queue 65 * @return handle to the queue
46 */ 66 */
47struct OperationQueue * 67struct OperationQueue *
48GNUNET_TESTBED_operation_queue_create_ (unsigned int max_active); 68GNUNET_TESTBED_operation_queue_create_ (enum OperationQueueType type,
69 unsigned int max_active);
49 70
50 71
51/** 72/**
@@ -199,5 +220,14 @@ void
199GNUNET_TESTBED_operation_activate_ (struct GNUNET_TESTBED_Operation *op); 220GNUNET_TESTBED_operation_activate_ (struct GNUNET_TESTBED_Operation *op);
200 221
201 222
223/**
224 * Marks an operation as failed
225 *
226 * @param op the operation to be marked as failed
227 */
228void
229GNUNET_TESTBED_operation_mark_failed (struct GNUNET_TESTBED_Operation *op);
230
231
202#endif 232#endif
203/* end of testbed_api_operations.h */ 233/* end of testbed_api_operations.h */