[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 11/45: Smaller changes. Changed order when set_wak
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 11/45: Smaller changes. Changed order when set_wakeup is called after some task is removed from pending_timeout |
Date: |
Sun, 31 Dec 2017 00:36:58 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit b1e413857618caed22d882da06d38bde79592d02
Author: t3sserakt <address@hidden>
AuthorDate: Tue Aug 8 18:30:33 2017 +0200
Smaller changes. Changed order when set_wakeup is called after some task is
removed from pending_timeout
---
src/util/scheduler.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 42309c199..e90763fb4 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -536,13 +536,15 @@ check_ready (const struct GNUNET_NETWORK_FDSet *rs,
pos->reason |= GNUNET_SCHEDULER_REASON_TIMEOUT;
if (0 == pos->reason)
break;
- scheduler_driver->set_wakeup (scheduler_driver->cls,
- pending_timeout_head->timeout);
+
GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
pending_timeout_tail,
pos);
if (pending_timeout_last == pos)
pending_timeout_last = NULL;
+ else
+ scheduler_driver->set_wakeup (scheduler_driver->cls,
+ pending_timeout_head->timeout);
queue_ready_task (pos);
}
pos = pending_head;
@@ -1080,6 +1082,7 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task
*task)
scheduler_driver->set_wakeup (scheduler_driver->cls,
pending_timeout_head->timeout);
}
+ //TODO check if this is redundant
if (task == pending_timeout_last)
pending_timeout_last = NULL;
}
@@ -1920,9 +1923,12 @@ GNUNET_SCHEDULER_run_from_driver (struct
GNUNET_SCHEDULER_Handle *sh)
GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
pending_timeout_tail,
pos);
-
scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
+
if (pending_timeout_last == pos)
pending_timeout_last = NULL;
+ else
+
scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
+
queue_ready_task (pos);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 04/45: Nearly finished. Call to set_wakeup missing in case of tasks added to pending_timeout, (continued)
- [GNUnet-SVN] [gnunet] 04/45: Nearly finished. Call to set_wakeup missing in case of tasks added to pending_timeout, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 08/45: fix warnings, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 09/45: add missing DLL insert, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 07/45: make input of getters const (needed for new scheduler API), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 13/45: Merge branch 'refactoring-scheduler' of ssh://gnunet.org/gnunet, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 18/45: cosmetic fixes, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 17/45: test_scheduler passing; new API function GNUNET_SCHEDULER_check_lifeness, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 16/45: lifeness checks; shutdown now working; checkSignal not passing yet, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 15/45: fix initFdInfo; rename to init_fd_info, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 10/45: fix segfault and pending_timeout logic, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 11/45: Smaller changes. Changed order when set_wakeup is called after some task is removed from pending_timeout,
gnunet <=
- [GNUnet-SVN] [gnunet] 20/45: remove unnecessary set_wakup call, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 14/45: fix indentation; remove unneeded set_wakeup call, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 19/45: fix compilation of debug code enabled by DEBUG_FDS; fix indentation, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 25/45: fix off-by-one error that prevented reading from stdin, gnunet, 2017/12/30
- [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