X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftestbed%2Ftestbed_api_operations.h;h=c44325307e0afbbcea21b3280380eca74c2f3eb7;hb=db9c68c76d7a9eb3f200df9d0fcaf971387cb061;hp=b6885e69abf0f4da1991f945d1cf8d1d98ec542d;hpb=468fea92f64d600ed635c417d91a235535098372;p=oweals%2Fgnunet.git 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 @@ -37,15 +37,36 @@ struct OperationQueue; +/** + * The type of operation queue + */ +enum OperationQueueType +{ + /** + * Operation queue which permits a fixed maximum number of operations to be + * active at any time + */ + OPERATION_QUEUE_TYPE_FIXED, + + /** + * Operation queue which adapts the number of operations to be active based on + * the operation completion times of previously executed operation in it + */ + OPERATION_QUEUE_TYPE_ADAPTIVE +}; + + /** * Create an operation queue. * - * @param max_active maximum number of operations in this - * queue that can be active in parallel at the same time + * @param type the type of operation queue + * @param max_active maximum number of operations in this queue that can be + * active in parallel at the same time. * @return handle to the queue */ struct OperationQueue * -GNUNET_TESTBED_operation_queue_create_ (unsigned int max_active); +GNUNET_TESTBED_operation_queue_create_ (enum OperationQueueType type, + unsigned int max_active); /** @@ -199,5 +220,14 @@ void GNUNET_TESTBED_operation_activate_ (struct GNUNET_TESTBED_Operation *op); +/** + * Marks an operation as failed + * + * @param op the operation to be marked as failed + */ +void +GNUNET_TESTBED_operation_mark_failed (struct GNUNET_TESTBED_Operation *op); + + #endif /* end of testbed_api_operations.h */