diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-04 14:00:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-04 14:00:32 +0000 |
commit | 83b19539f4d322b43683f5838b72e9ec2c8e6073 (patch) | |
tree | d0ab9329fcbefe360d9d14e2ace21a6b3396dfe9 /src/util/test_scheduler.c | |
parent | 28a2eb43281a1f08a67954f07beb9af3a9bc9a35 (diff) | |
download | gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.tar.gz gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.zip |
curly wars / auto-indentation
Diffstat (limited to 'src/util/test_scheduler.c')
-rw-r--r-- | src/util/test_scheduler.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index e2a28c1b7..788ba13fa 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -36,7 +36,7 @@ task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
36 | 36 | ||
37 | /* t4 should be ready (albeit with lower priority) */ | 37 | /* t4 should be ready (albeit with lower priority) */ |
38 | GNUNET_assert (1 == | 38 | GNUNET_assert (1 == |
39 | GNUNET_SCHEDULER_get_load (GNUNET_SCHEDULER_PRIORITY_COUNT)); | 39 | GNUNET_SCHEDULER_get_load (GNUNET_SCHEDULER_PRIORITY_COUNT)); |
40 | GNUNET_assert (3 == *ok); | 40 | GNUNET_assert (3 == *ok); |
41 | (*ok) = 4; | 41 | (*ok) = 4; |
42 | } | 42 | } |
@@ -51,7 +51,7 @@ task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
51 | (*ok) = 3; | 51 | (*ok) = 3; |
52 | /* t3 will go before t4: higher priority */ | 52 | /* t3 will go before t4: higher priority */ |
53 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_UI, &task3, | 53 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_UI, &task3, |
54 | cls); | 54 | cls); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void | 57 | static void |
@@ -106,8 +106,8 @@ taskRd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
106 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, fds[0])); | 106 | GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, fds[0])); |
107 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); | 107 | GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1)); |
108 | (*ok) = 8; | 108 | (*ok) = 8; |
109 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, | 109 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, &taskLast, |
110 | &taskLast, cls); | 110 | cls); |
111 | GNUNET_SCHEDULER_shutdown (); | 111 | GNUNET_SCHEDULER_shutdown (); |
112 | } | 112 | } |
113 | 113 | ||
@@ -123,10 +123,10 @@ task5 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
123 | GNUNET_assert (NULL != p); | 123 | GNUNET_assert (NULL != p); |
124 | fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ); | 124 | fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ); |
125 | fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE); | 125 | fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE); |
126 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[0], | 126 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[0], &taskRd, |
127 | &taskRd, cls); | 127 | cls); |
128 | GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[1], | 128 | GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[1], |
129 | &taskWrt, cls); | 129 | &taskWrt, cls); |
130 | } | 130 | } |
131 | 131 | ||
132 | 132 | ||
@@ -226,7 +226,7 @@ taskCancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
226 | GNUNET_assert (1 == *ok); | 226 | GNUNET_assert (1 == *ok); |
227 | *ok = 0; | 227 | *ok = 0; |
228 | GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_add_after | 228 | GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_add_after |
229 | (GNUNET_SCHEDULER_NO_TASK, &taskNeverRun, NULL)); | 229 | (GNUNET_SCHEDULER_NO_TASK, &taskNeverRun, NULL)); |
230 | } | 230 | } |
231 | 231 | ||
232 | 232 | ||