aboutsummaryrefslogtreecommitdiff
path: root/src/util/scheduler.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2017-08-03 06:04:45 +0200
committert3sserakt <t3ss@posteo.de>2017-08-03 06:04:45 +0200
commit06a875a49e9e020a504ff38e5e61691cb116fe14 (patch)
tree1ccb3e8ef2faeb6d2de889408cc9475cd5c1c994 /src/util/scheduler.c
parentd3cd9042bf5ba56e4577507842d6f66c8ba4b3c4 (diff)
downloadgnunet-06a875a49e9e020a504ff38e5e61691cb116fe14.tar.gz
gnunet-06a875a49e9e020a504ff38e5e61691cb116fe14.zip
Call to set_wakeup added after tasks added/removed to/from pending_timeout
Diffstat (limited to 'src/util/scheduler.c')
-rw-r--r--src/util/scheduler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 9061200bd..7fe18bbe6 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -539,6 +539,7 @@ check_ready (const struct GNUNET_NETWORK_FDSet *rs,
539 GNUNET_CONTAINER_DLL_remove (pending_timeout_head, 539 GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
540 pending_timeout_tail, 540 pending_timeout_tail,
541 pos); 541 pos);
542 scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
542 if (pending_timeout_last == pos) 543 if (pending_timeout_last == pos)
543 pending_timeout_last = NULL; 544 pending_timeout_last = NULL;
544 queue_ready_task (pos); 545 queue_ready_task (pos);
@@ -1131,6 +1132,7 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task *task)
1131 GNUNET_CONTAINER_DLL_remove (pending_timeout_head, 1132 GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
1132 pending_timeout_tail, 1133 pending_timeout_tail,
1133 task); 1134 task);
1135 scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
1134 if (task == pending_timeout_last) 1136 if (task == pending_timeout_last)
1135 pending_timeout_last = NULL; 1137 pending_timeout_last = NULL;
1136 } 1138 }
@@ -1259,6 +1261,7 @@ GNUNET_SCHEDULER_add_at_with_priority (struct GNUNET_TIME_Absolute at,
1259 GNUNET_CONTAINER_DLL_insert (pending_timeout_head, 1261 GNUNET_CONTAINER_DLL_insert (pending_timeout_head,
1260 pending_timeout_tail, 1262 pending_timeout_tail,
1261 t); 1263 t);
1264 scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
1262 } 1265 }
1263 else 1266 else
1264 { 1267 {
@@ -1981,6 +1984,7 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh)
1981 GNUNET_CONTAINER_DLL_remove (pending_timeout_head, 1984 GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
1982 pending_timeout_tail, 1985 pending_timeout_tail,
1983 pos); 1986 pos);
1987 scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
1984 if (pending_timeout_last == pos) 1988 if (pending_timeout_last == pos)
1985 pending_timeout_last = NULL; 1989 pending_timeout_last = NULL;
1986 queue_ready_task (pos); 1990 queue_ready_task (pos);