diff options
author | lurchi <lurchi@strangeplace.net> | 2017-08-25 12:59:28 +0200 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-08-25 12:59:28 +0200 |
commit | 909c769cc09296f8abccf2a5ee6a6a687b4efc3a (patch) | |
tree | 3bbf74084373614c3ba61a60f1eb19ff73913827 /src/include/gnunet_scheduler_lib.h | |
parent | ba7ceb320716f8a1b20883fccbdec15fee41002b (diff) | |
download | gnunet-909c769cc09296f8abccf2a5ee6a6a687b4efc3a.tar.gz gnunet-909c769cc09296f8abccf2a5ee6a6a687b4efc3a.zip |
clarify documentation about adding / deleting tasks
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 119f3c8ed..b6f127f0c 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -216,7 +216,8 @@ struct GNUNET_SCHEDULER_TaskContext | |||
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Function used by event-loop implementations to signal the scheduler | 218 | * Function used by event-loop implementations to signal the scheduler |
219 | * that a particular @a task is ready due to an event of type @a et. | 219 | * that a particular @a task is ready due to an event specified in the |
220 | * et field of @a fdi. | ||
220 | * | 221 | * |
221 | * This function will then queue the task to notify the application | 222 | * This function will then queue the task to notify the application |
222 | * that the task is ready (with the respective priority). | 223 | * that the task is ready (with the respective priority). |
@@ -268,8 +269,11 @@ struct GNUNET_SCHEDULER_Driver | |||
268 | void *cls; | 269 | void *cls; |
269 | 270 | ||
270 | /** | 271 | /** |
271 | * Add a @a task to be run if the conditions given | 272 | * Add a @a task to be run if the conditions specified in the |
272 | * in @a fdi are satisfied. | 273 | * et field of the given @a fdi are satisfied. The et field will |
274 | * be cleared after this call and the driver is expected to set | ||
275 | * the type of the actual event before passing @a fdi to | ||
276 | * #GNUNET_SCHEDULER_task_ready. | ||
273 | * | 277 | * |
274 | * @param cls closure | 278 | * @param cls closure |
275 | * @param task task to add | 279 | * @param task task to add |
@@ -283,18 +287,18 @@ struct GNUNET_SCHEDULER_Driver | |||
283 | struct GNUNET_SCHEDULER_FdInfo *fdi); | 287 | struct GNUNET_SCHEDULER_FdInfo *fdi); |
284 | 288 | ||
285 | /** | 289 | /** |
286 | * Delete a @a task from the set of tasks to be run. | 290 | * Delete a @a task from the set of tasks to be run. A task may |
291 | * comprise multiple FdInfo entries previously added with the add | ||
292 | * function. The driver is expected to delete them all. | ||
287 | * | 293 | * |
288 | * @param cls closure | 294 | * @param cls closure |
289 | * @param task task to delete | 295 | * @param task task to delete |
290 | * @param fdi conditions to watch for (must match @e add call) | ||
291 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 296 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
292 | * (i.e. @a task or @a fdi do not match prior @e add call) | 297 | * (i.e. @a task does not match prior @e add call) |
293 | */ | 298 | */ |
294 | int | 299 | int |
295 | (*del)(void *cls, | 300 | (*del)(void *cls, |
296 | struct GNUNET_SCHEDULER_Task *task, | 301 | struct GNUNET_SCHEDULER_Task *task); |
297 | struct GNUNET_SCHEDULER_FdInfo *fdi); | ||
298 | 302 | ||
299 | /** | 303 | /** |
300 | * Set time at which we definitively want to get a wakeup call. | 304 | * Set time at which we definitively want to get a wakeup call. |