[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 38/45: clarify documentation about adding / deleti
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 38/45: clarify documentation about adding / deleting tasks |
Date: |
Sun, 31 Dec 2017 00:37:25 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit 909c769cc09296f8abccf2a5ee6a6a687b4efc3a
Author: lurchi <address@hidden>
AuthorDate: Fri Aug 25 12:59:28 2017 +0200
clarify documentation about adding / deleting tasks
---
src/include/gnunet_scheduler_lib.h | 20 ++++++++++++--------
src/util/scheduler.c | 5 +++--
2 files changed, 15 insertions(+), 10 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
/**
* Function used by event-loop implementations to signal the scheduler
- * that a particular @a task is ready due to an event of type @a et.
+ * that a particular @a task is ready due to an event specified in the
+ * et field of @a fdi.
*
* This function will then queue the task to notify the application
* that the task is ready (with the respective priority).
@@ -268,8 +269,11 @@ struct GNUNET_SCHEDULER_Driver
void *cls;
/**
- * Add a @a task to be run if the conditions given
- * in @a fdi are satisfied.
+ * Add a @a task to be run if the conditions specified in the
+ * et field of the given @a fdi are satisfied. The et field will
+ * be cleared after this call and the driver is expected to set
+ * the type of the actual event before passing @a fdi to
+ * #GNUNET_SCHEDULER_task_ready.
*
* @param cls closure
* @param task task to add
@@ -283,18 +287,18 @@ struct GNUNET_SCHEDULER_Driver
struct GNUNET_SCHEDULER_FdInfo *fdi);
/**
- * Delete a @a task from the set of tasks to be run.
+ * Delete a @a task from the set of tasks to be run. A task may
+ * comprise multiple FdInfo entries previously added with the add
+ * function. The driver is expected to delete them all.
*
* @param cls closure
* @param task task to delete
- * @param fdi conditions to watch for (must match @e add call)
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
- * (i.e. @a task or @a fdi do not match prior @e add call)
+ * (i.e. @a task does not match prior @e add call)
*/
int
(*del)(void *cls,
- struct GNUNET_SCHEDULER_Task *task,
- struct GNUNET_SCHEDULER_FdInfo *fdi);
+ struct GNUNET_SCHEDULER_Task *task);
/**
* Set time at which we definitively want to get a wakeup call.
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 32916d99d..ac9494fa0 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -1829,12 +1829,13 @@ GNUNET_SCHEDULER_add_select (enum
GNUNET_SCHEDULER_Priority prio,
/**
* Function used by event-loop implementations to signal the scheduler
- * that a particular @a task is ready due to an event of type @a et.
+ * that a particular @a task is ready due to an event specified in the
+ * et field of @a fdi.
*
* This function will then queue the task to notify the application
* that the task is ready (with the respective priority).
*
- * @param task the task that is ready, NULL for wake up calls
+ * @param task the task that is ready
* @param fdi information about the related FD
*/
void
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 36/45: fix behaviour of GNUNET_SCHEDULER_add_select on empty fdsets, (continued)
- [GNUnet-SVN] [gnunet] 36/45: fix behaviour of GNUNET_SCHEDULER_add_select on empty fdsets, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 39/45: Don't consider restart when the test action already finished, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 35/45: NULL-initialize array pointers, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 34/45: cleanup, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 28/45: increasing length variable is already done by GNUNET_xgrow_ (called by the GNUNET_array_append macro), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 31/45: improve documentation about the GNUNET_array_append and GNUNET_array_grow macros, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 22/45: Revert "set fds_len in all cases; call set_wakeup only in two places", gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 33/45: GNUNET_SCHEDULER_check_lifeness not needed anymore, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 23/45: set fds_len in all cases; call set_wakeup only in two places, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 21/45: set fds_len in all cases; call set_wakeup only in two places, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 38/45: clarify documentation about adding / deleting tasks,
gnunet <=
- [GNUnet-SVN] [gnunet] 12/45: separate the select driver's fd sets from the driver-internal fdsets, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 40/45: Remove busy waiting checks, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 29/45: implement bookkeeping about which FDs related to a tasks have been marked ready (required API change in GNUNET_SCHEDULER_task_ready), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 45/45: merge branch 'refactoring-scheduler', gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 26/45: reimplement init_fd_info as preparation for refactoring GNUNET_SCHEDULER_add_select, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 24/45: init_fd_info now completely initializes fd information; Allow calling add/cancel functions only when the scheduler is running, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 42/45: handles, not handlers, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 30/45: only allocate network / file handles and store them in the task when GNUNET_SCHEDULER_add_select is used, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 43/45: Fix select loop running conditions, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 41/45: remove scheduler->internal code from driver loop, gnunet, 2017/12/30