[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 14/45: fix indentation; remove unneeded set_wakeup
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 14/45: fix indentation; remove unneeded set_wakeup call |
Date: |
Sun, 31 Dec 2017 00:37:01 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit 8bff0082dd564946d184b5eb8f7e2b253e65aeee
Author: lurchi <address@hidden>
AuthorDate: Wed Aug 9 13:28:45 2017 +0200
fix indentation; remove unneeded set_wakeup call
---
src/util/scheduler.c | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 68143d051..8a7155d07 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -1238,7 +1238,6 @@ add_without_sets (struct GNUNET_TIME_Relative delay,
}
}
#endif
-
#if PROFILE_DELAYS
t->start_time = GNUNET_TIME_absolute_get ();
#endif
@@ -1619,7 +1618,7 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task
*task,
reason |= GNUNET_SCHEDULER_REASON_WRITE_READY;
reason |= GNUNET_SCHEDULER_REASON_PREREQ_DONE;
task->reason = reason;
- task->fds = &task->fdx;
+ task->fds = &task->fdx; // FIXME: if task contains a list of fds, this is
wrong!
task->fdx.et = et;
task->fds_len = 1;
GNUNET_CONTAINER_DLL_remove (pending_head,
@@ -1666,9 +1665,6 @@ GNUNET_SCHEDULER_run_from_driver (struct
GNUNET_SCHEDULER_Handle *sh)
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);
}
@@ -1701,13 +1697,13 @@ GNUNET_SCHEDULER_run_from_driver (struct
GNUNET_SCHEDULER_Handle *sh)
active_task = pos;
#if PROFILE_DELAYS
if (GNUNET_TIME_absolute_get_duration (pos->start_time).rel_value_us >
- DELAY_THRESHOLD.rel_value_us)
+ DELAY_THRESHOLD.rel_value_us)
{
LOG (GNUNET_ERROR_TYPE_WARNING,
- "Task %p took %s to be scheduled\n",
- pos,
- GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration
(pos->start_time),
- GNUNET_YES));
+ "Task %p took %s to be scheduled\n",
+ pos,
+ GNUNET_STRINGS_relative_time_to_string
(GNUNET_TIME_absolute_get_duration (pos->start_time),
+ GNUNET_YES));
}
#endif
tc.reason = pos->reason;
@@ -1717,17 +1713,17 @@ GNUNET_SCHEDULER_run_from_driver (struct
GNUNET_SCHEDULER_Handle *sh)
tc.fds = pos->fds;
tc.read_ready = (NULL == pos->read_set) ? sh->rs : pos->read_set;
if ( (-1 != pos->read_fd) &&
- (0 != (pos->reason & GNUNET_SCHEDULER_REASON_READ_READY)) )
+ (0 != (pos->reason & GNUNET_SCHEDULER_REASON_READ_READY)) )
GNUNET_NETWORK_fdset_set_native (sh->rs,
- pos->read_fd);
+ pos->read_fd);
tc.write_ready = (NULL == pos->write_set) ? sh->ws : pos->write_set;
- if ((-1 != pos->write_fd) &&
- (0 != (pos->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)))
+ if ( (-1 != pos->write_fd) &&
+ (0 != (pos->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) )
GNUNET_NETWORK_fdset_set_native (sh->ws,
- pos->write_fd);
+ pos->write_fd);
LOG (GNUNET_ERROR_TYPE_WARNING,
- "Running task from driver: %p\n",
- pos);
+ "Running task from driver: %p\n",
+ pos);
pos->callback (pos->callback_cls);
active_task = NULL;
dump_backtrace (pos);
@@ -1832,7 +1828,7 @@ GNUNET_SCHEDULER_run_with_driver (const struct
GNUNET_SCHEDULER_Driver *driver,
/* begin main event loop */
sh.rs = GNUNET_NETWORK_fdset_create ();
sh.ws = GNUNET_NETWORK_fdset_create ();
- //GNUNET_NETWORK_fdset_handle_set (sh.rs, pr);
+ GNUNET_NETWORK_fdset_handle_set (sh.rs, pr);
ret = driver->loop (driver->cls,
&sh);
LOG (GNUNET_ERROR_TYPE_WARNING,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 09/45: add missing DLL insert, (continued)
- [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, 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 <=
- [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, 2017/12/30