From 4c6b07e810bd8b6245c152d6b3a161083105a165 Mon Sep 17 00:00:00 2001 From: lurchi Date: Thu, 1 Feb 2018 20:09:13 +0100 Subject: [PATCH] improve documentation --- src/include/gnunet_scheduler_lib.h | 15 ++++++++------- src/util/scheduler.c | 13 +++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index e5c361567..f9b2736e4 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h @@ -330,13 +330,14 @@ typedef void * Function called by external event loop implementations to initialize * the scheduler. An external implementation has to provide @a driver * which contains callbacks for the scheduler (see definition of struct - * #GNUNET_SCHEDULER_Driver) for instructing the external implementation - * to watch for events. If it detects any event it is expected to call - * #GNUNET_SCHEDULER_do_work to let the scheduler handle it. If an event - * is related to a specific task (e.g. the scheduler gave instructions - * to watch a file descriptor), the external implementation is expected - * to mark that task ready before by calling #GNUNET_SCHEDULER_task_ready. - + * #GNUNET_SCHEDULER_Driver). The callbacks are used to instruct the + * external implementation to watch for events. If it detects any of + * those events it is expected to call #GNUNET_SCHEDULER_do_work to let + * the scheduler handle it. If an event is related to a specific task + * (e.g. the scheduler gave instructions to watch a file descriptor), + * the external implementation is expected to mark that task ready + * before by calling #GNUNET_SCHEDULER_task_ready. + * * This function has to be called before any tasks are scheduled and * before GNUNET_SCHEDULER_do_work is called for the first time. It * allocates resources that have to be freed again by calling diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 05a951e19..51afc85e5 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -2128,12 +2128,13 @@ GNUNET_SCHEDULER_do_work (struct GNUNET_SCHEDULER_Handle *sh) * Function called by external event loop implementations to initialize * the scheduler. An external implementation has to provide @a driver * which contains callbacks for the scheduler (see definition of struct - * #GNUNET_SCHEDULER_Driver) for instructing the external implementation - * to watch for events. If it detects any event it is expected to call - * #GNUNET_SCHEDULER_do_work to let the scheduler handle it. If an event - * is related to a specific task (e.g. the scheduler gave instructions - * to watch a file descriptor), the external implementation is expected - * to mark that task ready before by calling #GNUNET_SCHEDULER_task_ready. + * #GNUNET_SCHEDULER_Driver). The callbacks are used to instruct the + * external implementation to watch for events. If it detects any of + * those events it is expected to call #GNUNET_SCHEDULER_do_work to let + * the scheduler handle it. If an event is related to a specific task + * (e.g. the scheduler gave instructions to watch a file descriptor), + * the external implementation is expected to mark that task ready + * before by calling #GNUNET_SCHEDULER_task_ready. * This function has to be called before any tasks are scheduled and * before GNUNET_SCHEDULER_do_work is called for the first time. It -- 2.25.1