diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-24 20:34:03 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-24 20:34:03 +0000 |
commit | e58e6a7ff78981fb4d592587a30e0a94b873a912 (patch) | |
tree | b401864812a88bf1b58972d5be74c480efbad932 /src/testbed/testbed_api_operations.h | |
parent | 20e7f1aee4f3bcdd46ff99a5a9e5ba81765cb878 (diff) | |
download | gnunet-e58e6a7ff78981fb4d592587a30e0a94b873a912.tar.gz gnunet-e58e6a7ff78981fb4d592587a30e0a94b873a912.zip |
multiple operation queues for an operation
Diffstat (limited to 'src/testbed/testbed_api_operations.h')
-rw-r--r-- | src/testbed/testbed_api_operations.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/testbed/testbed_api_operations.h b/src/testbed/testbed_api_operations.h index 519c68139..e78ed0fcc 100644 --- a/src/testbed/testbed_api_operations.h +++ b/src/testbed/testbed_api_operations.h | |||
@@ -59,13 +59,10 @@ GNUNET_TESTBED_operation_queue_destroy_ (struct OperationQueue *queue); | |||
59 | 59 | ||
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Add an operation to a queue. An operation can be in multiple | 62 | * Add an operation to a queue. An operation can be in multiple queues at |
63 | * queues at once. Once all queues permit the operation to become | 63 | * once. Once the operation is inserted into all the queues |
64 | * active, the operation will be activated. The actual activation | 64 | * GNUNET_TESTBED_operation_begin_wait_() has to be called to actually start |
65 | * will occur in a separate task (thus allowing multiple queue | 65 | * waiting for the operation to become active. |
66 | * insertions to be made without having the first one instantly | ||
67 | * trigger the operation if the first queue has sufficient | ||
68 | * resources). | ||
69 | * | 66 | * |
70 | * @param queue queue to add the operation to | 67 | * @param queue queue to add the operation to |
71 | * @param operation operation to add to the queue | 68 | * @param operation operation to add to the queue |
@@ -77,6 +74,20 @@ GNUNET_TESTBED_operation_queue_insert_ (struct OperationQueue *queue, | |||
77 | 74 | ||
78 | 75 | ||
79 | /** | 76 | /** |
77 | * Marks the given operation as waiting on the queues. Once all queues permit | ||
78 | * the operation to become active, the operation will be activated. The actual | ||
79 | * activation will occur in a separate task (thus allowing multiple queue | ||
80 | * insertions to be made without having the first one instantly trigger the | ||
81 | * operation if the first queue has sufficient resources). | ||
82 | * | ||
83 | * @param operation the operation to marks as waiting | ||
84 | */ | ||
85 | void | ||
86 | GNUNET_TESTBED_operation_begin_wait_ (struct GNUNET_TESTBED_Operation | ||
87 | *operation); | ||
88 | |||
89 | |||
90 | /** | ||
80 | * Remove an operation from a queue. This can be because the | 91 | * Remove an operation from a queue. This can be because the |
81 | * oeration was active and has completed (and the resources have | 92 | * oeration was active and has completed (and the resources have |
82 | * been released), or because the operation was cancelled and | 93 | * been released), or because the operation was cancelled and |