diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-29 12:16:51 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-29 12:16:51 +0100 |
commit | d10108c802b56535b03597e9fbb7603b0eeef9c0 (patch) | |
tree | 886713d48c99def9f7011ea977e8f4499d5f9212 | |
parent | ca78392674d82d97832798f933b9c75f4e0af367 (diff) | |
download | gnunet-d10108c802b56535b03597e9fbb7603b0eeef9c0.tar.gz gnunet-d10108c802b56535b03597e9fbb7603b0eeef9c0.zip |
minor style fix
-rw-r--r-- | src/util/scheduler.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index a7b1d8e2a..b07c51811 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -73,7 +73,7 @@ | |||
73 | * Argument to be passed from the driver to | 73 | * Argument to be passed from the driver to |
74 | * #GNUNET_SCHEDULER_run_from_driver(). Contains the | 74 | * #GNUNET_SCHEDULER_run_from_driver(). Contains the |
75 | * scheduler's internal state. | 75 | * scheduler's internal state. |
76 | */ | 76 | */ |
77 | struct GNUNET_SCHEDULER_Handle | 77 | struct GNUNET_SCHEDULER_Handle |
78 | { | 78 | { |
79 | /** | 79 | /** |
@@ -94,7 +94,7 @@ struct GNUNET_SCHEDULER_Handle | |||
94 | * Driver we used for the event loop. | 94 | * Driver we used for the event loop. |
95 | */ | 95 | */ |
96 | const struct GNUNET_SCHEDULER_Driver *driver; | 96 | const struct GNUNET_SCHEDULER_Driver *driver; |
97 | 97 | ||
98 | }; | 98 | }; |
99 | 99 | ||
100 | 100 | ||
@@ -127,7 +127,7 @@ struct GNUNET_SCHEDULER_Task | |||
127 | * Handle to the scheduler's state. | 127 | * Handle to the scheduler's state. |
128 | */ | 128 | */ |
129 | const struct GNUNET_SCHEDULER_Handle *sh; | 129 | const struct GNUNET_SCHEDULER_Handle *sh; |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * Set of file descriptors this task is waiting | 132 | * Set of file descriptors this task is waiting |
133 | * for for reading. Once ready, this is updated | 133 | * for for reading. Once ready, this is updated |
@@ -172,7 +172,7 @@ struct GNUNET_SCHEDULER_Task | |||
172 | * Size of the @e fds array. | 172 | * Size of the @e fds array. |
173 | */ | 173 | */ |
174 | unsigned int fds_len; | 174 | unsigned int fds_len; |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Why is the task ready? Set after task is added to ready queue. | 177 | * Why is the task ready? Set after task is added to ready queue. |
178 | * Initially set to zero. All reasons that have already been | 178 | * Initially set to zero. All reasons that have already been |
@@ -589,9 +589,7 @@ static void | |||
589 | dump_backtrace (struct GNUNET_SCHEDULER_Task *t) | 589 | dump_backtrace (struct GNUNET_SCHEDULER_Task *t) |
590 | { | 590 | { |
591 | #if EXECINFO | 591 | #if EXECINFO |
592 | unsigned int i; | 592 | for (unsigned int i = 0; i < t->num_backtrace_strings; i++) |
593 | |||
594 | for (i = 0; i < t->num_backtrace_strings; i++) | ||
595 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 593 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
596 | "Task %p trace %u: %s\n", | 594 | "Task %p trace %u: %s\n", |
597 | t, | 595 | t, |
@@ -1849,7 +1847,7 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, | |||
1849 | * | 1847 | * |
1850 | * @param sh scheduler handle that was given to the `loop` | 1848 | * @param sh scheduler handle that was given to the `loop` |
1851 | * @return #GNUNET_OK if there are more tasks that are ready, | 1849 | * @return #GNUNET_OK if there are more tasks that are ready, |
1852 | * and thus we would like to run more (yield to avoid | 1850 | * and thus we would like to run more (yield to avoid |
1853 | * blocking other activities for too long) | 1851 | * blocking other activities for too long) |
1854 | * #GNUNET_NO if we are done running tasks (yield to block) | 1852 | * #GNUNET_NO if we are done running tasks (yield to block) |
1855 | * #GNUNET_SYSERR on error | 1853 | * #GNUNET_SYSERR on error |
@@ -1876,11 +1874,11 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) | |||
1876 | pending_timeout_last = NULL; | 1874 | pending_timeout_last = NULL; |
1877 | queue_ready_task (pos); | 1875 | queue_ready_task (pos); |
1878 | } | 1876 | } |
1879 | 1877 | ||
1880 | if (0 == ready_count) | 1878 | if (0 == ready_count) |
1881 | return GNUNET_NO; | 1879 | return GNUNET_NO; |
1882 | 1880 | ||
1883 | /* find out which task priority level we are going to | 1881 | /* find out which task priority level we are going to |
1884 | process this time */ | 1882 | process this time */ |
1885 | max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; | 1883 | max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; |
1886 | GNUNET_assert (NULL == ready_head[GNUNET_SCHEDULER_PRIORITY_KEEP]); | 1884 | GNUNET_assert (NULL == ready_head[GNUNET_SCHEDULER_PRIORITY_KEEP]); |