[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 33/45: GNUNET_SCHEDULER_check_lifeness not needed
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 33/45: GNUNET_SCHEDULER_check_lifeness not needed anymore |
Date: |
Sun, 31 Dec 2017 00:37:20 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit b5080c190338cc9031a9d81916828b0ddd855eb3
Author: lurchi <address@hidden>
AuthorDate: Wed Aug 23 15:45:52 2017 +0200
GNUNET_SCHEDULER_check_lifeness not needed anymore
---
src/include/gnunet_scheduler_lib.h | 15 --------------
src/util/scheduler.c | 41 --------------------------------------
2 files changed, 56 deletions(-)
diff --git a/src/include/gnunet_scheduler_lib.h
b/src/include/gnunet_scheduler_lib.h
index 5f9389726..119f3c8ed 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -383,21 +383,6 @@ typedef int
/**
- * 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.
- *
- * 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 ();
-
-
-/**
* Initialize and run scheduler. This function will return when all
* tasks have completed. On systems with signals, receiving a SIGTERM
* (and other similar signals) will cause #GNUNET_SCHEDULER_shutdown
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 084ca43df..b59919818 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -604,47 +604,6 @@ sighandler_shutdown ()
}
-/**
- * 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.
- *
- * 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
- */
-// FIXME: make it an internal function again
-int
-GNUNET_SCHEDULER_check_lifeness ()
-{
- struct GNUNET_SCHEDULER_Task *t;
-
- if (ready_count > 0)
- return GNUNET_YES;
- for (t = pending_head; NULL != t; t = t->next)
- if (t->lifeness == GNUNET_YES)
- return GNUNET_YES;
- for (t = shutdown_head; NULL != t; t = t->next)
- if (t->lifeness == GNUNET_YES)
- return GNUNET_YES;
- for (t = pending_timeout_head; NULL != t; t = t->next)
- if (t->lifeness == GNUNET_YES)
- return GNUNET_YES;
- if (NULL != shutdown_head)
- {
- GNUNET_SCHEDULER_shutdown ();
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "shutting down\n");
- scheduler_driver->set_wakeup (scheduler_driver->cls,
- GNUNET_TIME_absolute_get ());
- return GNUNET_YES;
- }
- return GNUNET_NO;
-}
-
-
void
shutdown_if_no_lifeness ()
{
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 14/45: fix indentation; remove unneeded set_wakeup call, (continued)
- [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
- [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 <=
- [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, 2017/12/30
- [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