diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-08 21:31:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-08 21:31:27 +0000 |
commit | 024450ec8ac7d00b5c7c830d34ee1843b6c3a753 (patch) | |
tree | f5f8e91f837474ef4bca22f91672a3b14a606787 /src/util/test_scheduler.c | |
parent | bb82fb7f4ea781b843f032c6869f98e6fa6fa107 (diff) | |
download | gnunet-024450ec8ac7d00b5c7c830d34ee1843b6c3a753.tar.gz gnunet-024450ec8ac7d00b5c7c830d34ee1843b6c3a753.zip |
indenting
Diffstat (limited to 'src/util/test_scheduler.c')
-rw-r--r-- | src/util/test_scheduler.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index 3021dce19..74be05654 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -48,9 +48,9 @@ task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
48 | GNUNET_assert (2 == *ok); | 48 | GNUNET_assert (2 == *ok); |
49 | (*ok) = 3; | 49 | (*ok) = 3; |
50 | /* t3 will go before t4: higher priority */ | 50 | /* t3 will go before t4: higher priority */ |
51 | GNUNET_SCHEDULER_add_with_priority (tc->sched, | 51 | GNUNET_SCHEDULER_add_with_priority (tc->sched, |
52 | GNUNET_SCHEDULER_PRIORITY_UI, | 52 | GNUNET_SCHEDULER_PRIORITY_UI, |
53 | &task3, cls); | 53 | &task3, cls); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void | 56 | static void |
@@ -102,8 +102,8 @@ taskRd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); | 102 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); |
103 | (*ok) = 8; | 103 | (*ok) = 8; |
104 | GNUNET_SCHEDULER_add_with_priority (tc->sched, | 104 | GNUNET_SCHEDULER_add_with_priority (tc->sched, |
105 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 105 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
106 | &taskLast, cls); | 106 | &taskLast, cls); |
107 | GNUNET_SCHEDULER_shutdown (tc->sched); | 107 | GNUNET_SCHEDULER_shutdown (tc->sched); |
108 | } | 108 | } |
109 | 109 | ||
@@ -140,11 +140,9 @@ task1 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
140 | t2 = GNUNET_SCHEDULER_add_after (tc->sched, | 140 | t2 = GNUNET_SCHEDULER_add_after (tc->sched, |
141 | GNUNET_SCHEDULER_NO_TASK, &task2, cls); | 141 | GNUNET_SCHEDULER_NO_TASK, &task2, cls); |
142 | /* t4 will go after t2 ('add after') and after t3 (priority) */ | 142 | /* t4 will go after t2 ('add after') and after t3 (priority) */ |
143 | t4 = GNUNET_SCHEDULER_add_after (tc->sched, | 143 | t4 = GNUNET_SCHEDULER_add_after (tc->sched, t2, &task4, cls); |
144 | t2, &task4, cls); | ||
145 | /* t5 will go last (after p4) */ | 144 | /* t5 will go last (after p4) */ |
146 | GNUNET_SCHEDULER_add_after (tc->sched, | 145 | GNUNET_SCHEDULER_add_after (tc->sched, t4, &task5, cls); |
147 | t4, &task5, cls); | ||
148 | } | 146 | } |
149 | 147 | ||
150 | 148 | ||
@@ -171,8 +169,7 @@ taskShutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
171 | GNUNET_assert (1 == *ok); | 169 | GNUNET_assert (1 == *ok); |
172 | *ok = 8; | 170 | *ok = 8; |
173 | GNUNET_SCHEDULER_add_delayed (tc->sched, | 171 | GNUNET_SCHEDULER_add_delayed (tc->sched, |
174 | GNUNET_TIME_UNIT_FOREVER_REL, | 172 | GNUNET_TIME_UNIT_FOREVER_REL, &taskLast, cls); |
175 | &taskLast, cls); | ||
176 | GNUNET_SCHEDULER_shutdown (tc->sched); | 173 | GNUNET_SCHEDULER_shutdown (tc->sched); |
177 | } | 174 | } |
178 | 175 | ||
@@ -199,8 +196,7 @@ taskSig (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
199 | GNUNET_assert (1 == *ok); | 196 | GNUNET_assert (1 == *ok); |
200 | *ok = 8; | 197 | *ok = 8; |
201 | GNUNET_SCHEDULER_add_delayed (tc->sched, | 198 | GNUNET_SCHEDULER_add_delayed (tc->sched, |
202 | GNUNET_TIME_UNIT_FOREVER_REL, | 199 | GNUNET_TIME_UNIT_FOREVER_REL, &taskLast, cls); |
203 | &taskLast, cls); | ||
204 | #ifndef MINGW | 200 | #ifndef MINGW |
205 | GNUNET_break (0 == PLIBC_KILL (getpid (), SIGTERM)); | 201 | GNUNET_break (0 == PLIBC_KILL (getpid (), SIGTERM)); |
206 | #else | 202 | #else |