diff options
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index b6f127f0c..aded41de8 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -242,15 +242,16 @@ struct GNUNET_SCHEDULER_Handle; | |||
242 | * there are tasks left to run just to give other tasks a chance as | 242 | * there are tasks left to run just to give other tasks a chance as |
243 | * well. If we return #GNUNET_YES, the driver should call this | 243 | * well. If we return #GNUNET_YES, the driver should call this |
244 | * function again as soon as possible, while if we return #GNUNET_NO | 244 | * function again as soon as possible, while if we return #GNUNET_NO |
245 | * it must block until the operating system has more work as the | 245 | * it must block until either the operating system has more work (the |
246 | * scheduler has no more work to do right now. | 246 | * scheduler has no more work to do right now) or the timeout set by |
247 | * the scheduler (using the set_wakeup callback) is reached. | ||
247 | * | 248 | * |
248 | * @param sh scheduler handle that was given to the `loop` | 249 | * @param sh scheduler handle that was given to the `loop` |
249 | * @return #GNUNET_OK if there are more tasks that are ready, | 250 | * @return #GNUNET_OK if there are more tasks that are ready, |
250 | * and thus we would like to run more (yield to avoid | 251 | * and thus we would like to run more (yield to avoid |
251 | * blocking other activities for too long) | 252 | * blocking other activities for too long) |
252 | * #GNUNET_NO if we are done running tasks (yield to block) | 253 | * #GNUNET_NO if we are done running tasks (yield to block) |
253 | * #GNUNET_SYSERR on error | 254 | * #GNUNET_SYSERR on error, e.g. no tasks were ready |
254 | */ | 255 | */ |
255 | int | 256 | int |
256 | GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh); | 257 | GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh); |
@@ -313,7 +314,10 @@ struct GNUNET_SCHEDULER_Driver | |||
313 | /** | 314 | /** |
314 | * Event loop's "main" function, to be called from | 315 | * Event loop's "main" function, to be called from |
315 | * #GNUNET_SCHEDULER_run_with_driver() to actually | 316 | * #GNUNET_SCHEDULER_run_with_driver() to actually |
316 | * launch the loop. | 317 | * launch the loop. The loop should run as long as |
318 | * tasks (added by the add callback) are available | ||
319 | * OR the wakeup time (added by the set_wakeup | ||
320 | * callback) is not FOREVER. | ||
317 | * | 321 | * |
318 | * @param cls closure | 322 | * @param cls closure |
319 | * @param sh scheduler handle to pass to | 323 | * @param sh scheduler handle to pass to |