aboutsummaryrefslogtreecommitdiff
path: root/src/util/scheduler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-08-03 09:44:26 +0000
committerChristian Grothoff <christian@grothoff.org>2015-08-03 09:44:26 +0000
commit0f9c537f66e4f8eaaceb22ec007dac559133e0d6 (patch)
tree9cf8eb110f1dcf5e8912c95bd45fecb143c832a9 /src/util/scheduler.c
parentd3e7a5e40dd2d5409009a30e1e41148c4d852673 (diff)
downloadgnunet-0f9c537f66e4f8eaaceb22ec007dac559133e0d6.tar.gz
gnunet-0f9c537f66e4f8eaaceb22ec007dac559133e0d6.zip
eliminate dead GNUNET_SCHEDULER_add_continuation, rename GNUNET_SCHEDULER_add_continuation_with_priority to GNUNET_SCHEDULER_add_with_reason_and_priority for consistency
Diffstat (limited to 'src/util/scheduler.c')
-rw-r--r--src/util/scheduler.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 11e7966ff..fe9d89d69 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -757,9 +757,10 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task,
757#endif 757#endif
758 current_priority = GNUNET_SCHEDULER_PRIORITY_DEFAULT; 758 current_priority = GNUNET_SCHEDULER_PRIORITY_DEFAULT;
759 current_lifeness = GNUNET_YES; 759 current_lifeness = GNUNET_YES;
760 GNUNET_SCHEDULER_add_continuation (task, 760 GNUNET_SCHEDULER_add_with_reason_and_priority (task,
761 task_cls, 761 task_cls,
762 GNUNET_SCHEDULER_REASON_STARTUP); 762 GNUNET_SCHEDULER_REASON_STARTUP,
763 GNUNET_SCHEDULER_PRIORITY_DEFAULT);
763 active_task = (void *) (long) -1; /* force passing of sanity check */ 764 active_task = (void *) (long) -1; /* force passing of sanity check */
764 GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO, 765 GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO,
765 &GNUNET_OS_install_parent_control_handler, 766 &GNUNET_OS_install_parent_control_handler,
@@ -1004,10 +1005,10 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task *task)
1004 * @param priority priority to use for the task 1005 * @param priority priority to use for the task
1005 */ 1006 */
1006void 1007void
1007GNUNET_SCHEDULER_add_continuation_with_priority (GNUNET_SCHEDULER_TaskCallback task, 1008GNUNET_SCHEDULER_add_with_reason_and_priority (GNUNET_SCHEDULER_TaskCallback task,
1008 void *task_cls, 1009 void *task_cls,
1009 enum GNUNET_SCHEDULER_Reason reason, 1010 enum GNUNET_SCHEDULER_Reason reason,
1010 enum GNUNET_SCHEDULER_Priority priority) 1011 enum GNUNET_SCHEDULER_Priority priority)
1011{ 1012{
1012 struct GNUNET_SCHEDULER_Task *t; 1013 struct GNUNET_SCHEDULER_Task *t;
1013 1014
@@ -1042,25 +1043,6 @@ GNUNET_SCHEDULER_add_continuation_with_priority (GNUNET_SCHEDULER_TaskCallback t
1042 1043
1043 1044
1044/** 1045/**
1045 * Continue the current execution with the given function. This is
1046 * similar to the other "add" functions except that there is no delay
1047 * and the reason code can be specified.
1048 *
1049 * @param task main function of the task
1050 * @param task_cls closure for @a task
1051 * @param reason reason for task invocation
1052 */
1053void
1054GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_TaskCallback task, void *task_cls,
1055 enum GNUNET_SCHEDULER_Reason reason)
1056{
1057 GNUNET_SCHEDULER_add_continuation_with_priority (task, task_cls,
1058 reason,
1059 GNUNET_SCHEDULER_PRIORITY_DEFAULT);
1060}
1061
1062
1063/**
1064 * Schedule a new task to be run with a specified delay. The task 1046 * Schedule a new task to be run with a specified delay. The task
1065 * will be scheduled for execution once the delay has expired. 1047 * will be scheduled for execution once the delay has expired.
1066 * 1048 *