[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 18/45: cosmetic fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 18/45: cosmetic fixes |
Date: |
Sun, 31 Dec 2017 00:37:05 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit 6fcafa3adc10394ad79db171a3a22c3260512f43
Author: lurchi <address@hidden>
AuthorDate: Wed Aug 9 22:37:43 2017 +0200
cosmetic fixes
---
src/util/scheduler.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index f2fdbef2b..5a727c663 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -577,11 +577,15 @@ sighandler_shutdown ()
/**
- * Check if the system is still alive. Trigger shutdown if we
- * have tasks, but none of them give us lifeness.
+ * Check if the system has initiated shutdown. This means no tasks
+ * that prevent shutdown were present and all tasks added with
+ * #GNUNET_SCHEDULER_add_shutdown were run already.
*
- * @return #GNUNET_OK to continue the main loop,
- * #GNUNET_NO to exit
+ * Can be used by external event loop implementations to decide
+ * whether to keep running or not.
+ *
+ * @return #GNUNET_YES if tasks which prevent shutdown exist
+ * #GNUNET_NO if the system has initiated shutdown
*/
int
GNUNET_SCHEDULER_check_lifeness ()
@@ -589,20 +593,20 @@ GNUNET_SCHEDULER_check_lifeness ()
struct GNUNET_SCHEDULER_Task *t;
if (ready_count > 0)
- return GNUNET_OK;
+ return GNUNET_YES;
for (t = pending_head; NULL != t; t = t->next)
if (t->lifeness == GNUNET_YES)
- return GNUNET_OK;
+ return GNUNET_YES;
for (t = shutdown_head; NULL != t; t = t->next)
if (t->lifeness == GNUNET_YES)
- return GNUNET_OK;
+ return GNUNET_YES;
for (t = pending_timeout_head; NULL != t; t = t->next)
if (t->lifeness == GNUNET_YES)
- return GNUNET_OK;
+ return GNUNET_YES;
if (NULL != shutdown_head)
{
GNUNET_SCHEDULER_shutdown ();
- return GNUNET_OK;
+ return GNUNET_YES;
}
return GNUNET_NO;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 01/45: started further refactoring of scheduler. ATTENTION, actual Status does not compile!, (continued)
- [GNUnet-SVN] [gnunet] 01/45: started further refactoring of scheduler. ATTENTION, actual Status does not compile!, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 02/45: small fixes, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 06/45: GNUNET_SCHEDULER_run is calling GNUNET_SCHEDULER_run_with_driver with the default select polling backend., gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 03/45: adapt add_without_sets to scheduler driver API; reimplement initFdInfo, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 05/45: Call to set_wakeup added after tasks added/removed to/from pending_timeout, gnunet, 2017/12/30
- [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 <=
- [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, 2017/12/30
- [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