gnunet-svn
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]