[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 06/45: GNUNET_SCHEDULER_run is calling GNUNET_SCHE
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 06/45: GNUNET_SCHEDULER_run is calling GNUNET_SCHEDULER_run_with_driver with the default select polling backend. |
Date: |
Sun, 31 Dec 2017 00:36:53 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit 646bbf4ddba3a37c4af0bb62e90be48a465d2004
Author: t3sserakt <address@hidden>
AuthorDate: Fri Aug 4 08:45:30 2017 +0200
GNUNET_SCHEDULER_run is calling GNUNET_SCHEDULER_run_with_driver with the
default select polling backend.
---
src/util/scheduler.c | 74 +---------------------------------------------------
1 file changed, 1 insertion(+), 73 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 7fe18bbe6..e442989d0 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -928,81 +928,9 @@ void
GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task,
void *task_cls)
{
- struct GNUNET_NETWORK_FDSet *rs;
- struct GNUNET_NETWORK_FDSet *ws;
-
-
- struct GNUNET_SIGNAL_Context *shc_int;
- struct GNUNET_SIGNAL_Context *shc_term;
-#if (SIGTERM != GNUNET_TERM_SIG)
- struct GNUNET_SIGNAL_Context *shc_gterm;
-#endif
-
-#ifndef MINGW
- struct GNUNET_SIGNAL_Context *shc_quit;
- struct GNUNET_SIGNAL_Context *shc_hup;
- struct GNUNET_SIGNAL_Context *shc_pipe;
-#endif
-
-
- GNUNET_assert (NULL == active_task);
- rs = GNUNET_NETWORK_fdset_create ();
- ws = GNUNET_NETWORK_fdset_create ();
- GNUNET_assert (NULL == shutdown_pipe_handle);
- shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_NO,
- GNUNET_NO,
- GNUNET_NO,
- GNUNET_NO);
- GNUNET_assert (NULL != shutdown_pipe_handle);
+ GNUNET_SCHEDULER_run_with_driver(GNUNET_SCHEDULER_driver_select, task,
task_cls);
- my_pid = getpid ();
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Registering signal handlers\n");
- shc_int = GNUNET_SIGNAL_handler_install (SIGINT,
- &sighandler_shutdown);
- shc_term = GNUNET_SIGNAL_handler_install (SIGTERM,
- &sighandler_shutdown);
-#if (SIGTERM != GNUNET_TERM_SIG)
- shc_gterm = GNUNET_SIGNAL_handler_install (GNUNET_TERM_SIG,
- &sighandler_shutdown);
-#endif
-#ifndef MINGW
- shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE,
- &sighandler_pipe);
- shc_quit = GNUNET_SIGNAL_handler_install (SIGQUIT,
- &sighandler_shutdown);
- shc_hup = GNUNET_SIGNAL_handler_install (SIGHUP,
- &sighandler_shutdown);
-#endif
- current_priority = GNUNET_SCHEDULER_PRIORITY_DEFAULT;
- current_lifeness = GNUNET_YES;
- GNUNET_SCHEDULER_add_with_reason_and_priority (task,
- task_cls,
-
GNUNET_SCHEDULER_REASON_STARTUP,
-
GNUNET_SCHEDULER_PRIORITY_DEFAULT);
- active_task = (void *) (long) -1; /* force passing of sanity check */
- GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO,
-
&GNUNET_OS_install_parent_control_handler,
- NULL);
- active_task = NULL;
-
-
- while_live(rs, ws);
- GNUNET_SIGNAL_handler_uninstall (shc_int);
- GNUNET_SIGNAL_handler_uninstall (shc_term);
-#if (SIGTERM != GNUNET_TERM_SIG)
- GNUNET_SIGNAL_handler_uninstall (shc_gterm);
-#endif
-#ifndef MINGW
- GNUNET_SIGNAL_handler_uninstall (shc_pipe);
- GNUNET_SIGNAL_handler_uninstall (shc_quit);
- GNUNET_SIGNAL_handler_uninstall (shc_hup);
-#endif
- GNUNET_DISK_pipe_close (shutdown_pipe_handle);
- shutdown_pipe_handle = NULL;
- GNUNET_NETWORK_fdset_destroy (rs);
- GNUNET_NETWORK_fdset_destroy (ws);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (5c8feda7f -> dca8eb9c4), gnunet, 2017/12/30
- [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 <=
- [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, 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