aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_scheduler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-11-01 20:47:52 +0000
committerChristian Grothoff <christian@grothoff.org>2009-11-01 20:47:52 +0000
commit652e89b59ed2207c2c12172fdabcd6e659995c81 (patch)
treef054c819d483c1056e18c1099afd4c7fcd2582a0 /src/util/test_scheduler.c
parent5e4113e83368849500792e57946c3d8dd9e548d8 (diff)
downloadgnunet-652e89b59ed2207c2c12172fdabcd6e659995c81.tar.gz
gnunet-652e89b59ed2207c2c12172fdabcd6e659995c81.zip
fixing bio testcase and a bug in bio.c, also indenting
Diffstat (limited to 'src/util/test_scheduler.c')
-rw-r--r--src/util/test_scheduler.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c
index b19ccff2d..98dce6f97 100644
--- a/src/util/test_scheduler.c
+++ b/src/util/test_scheduler.c
@@ -119,17 +119,17 @@ task5 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
119 fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ); 119 fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ);
120 fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE); 120 fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE);
121 GNUNET_SCHEDULER_add_read_file (tc->sched, 121 GNUNET_SCHEDULER_add_read_file (tc->sched,
122 GNUNET_NO, 122 GNUNET_NO,
123 GNUNET_SCHEDULER_PRIORITY_DEFAULT, 123 GNUNET_SCHEDULER_PRIORITY_DEFAULT,
124 GNUNET_SCHEDULER_NO_TASK, 124 GNUNET_SCHEDULER_NO_TASK,
125 GNUNET_TIME_UNIT_FOREVER_REL, 125 GNUNET_TIME_UNIT_FOREVER_REL,
126 fds[0], &taskRd, cls); 126 fds[0], &taskRd, cls);
127 GNUNET_SCHEDULER_add_write_file (tc->sched, 127 GNUNET_SCHEDULER_add_write_file (tc->sched,
128 GNUNET_NO, 128 GNUNET_NO,
129 GNUNET_SCHEDULER_PRIORITY_DEFAULT, 129 GNUNET_SCHEDULER_PRIORITY_DEFAULT,
130 GNUNET_SCHEDULER_NO_TASK, 130 GNUNET_SCHEDULER_NO_TASK,
131 GNUNET_TIME_UNIT_FOREVER_REL, 131 GNUNET_TIME_UNIT_FOREVER_REL,
132 fds[1], &taskWrt, cls); 132 fds[1], &taskWrt, cls);
133} 133}
134 134
135 135
@@ -146,19 +146,18 @@ task1 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
146 t2 = GNUNET_SCHEDULER_add_after (tc->sched, 146 t2 = GNUNET_SCHEDULER_add_after (tc->sched,
147 GNUNET_NO, 147 GNUNET_NO,
148 GNUNET_SCHEDULER_PRIORITY_IDLE, 148 GNUNET_SCHEDULER_PRIORITY_IDLE,
149 GNUNET_SCHEDULER_NO_TASK, 149 GNUNET_SCHEDULER_NO_TASK, &task2, cls);
150 &task2, cls);
151 /* t3 will go before t4: higher priority */ 150 /* t3 will go before t4: higher priority */
152 t4 = GNUNET_SCHEDULER_add_after (tc->sched, 151 t4 = GNUNET_SCHEDULER_add_after (tc->sched,
153 GNUNET_NO, 152 GNUNET_NO,
154 GNUNET_SCHEDULER_PRIORITY_IDLE, 153 GNUNET_SCHEDULER_PRIORITY_IDLE,
155 t2, &task4, cls); 154 t2, &task4, cls);
156 GNUNET_SCHEDULER_add_delayed (tc->sched, 155 GNUNET_SCHEDULER_add_delayed (tc->sched,
157 GNUNET_NO, 156 GNUNET_NO,
158 GNUNET_SCHEDULER_PRIORITY_DEFAULT, 157 GNUNET_SCHEDULER_PRIORITY_DEFAULT,
159 t2, 158 t2,
160 GNUNET_TIME_relative_get_zero (), 159 GNUNET_TIME_relative_get_zero (),
161 &task3, cls); 160 &task3, cls);
162 /* t4 will go first: lower prio, but prereq! */ 161 /* t4 will go first: lower prio, but prereq! */
163 GNUNET_SCHEDULER_add_after (tc->sched, 162 GNUNET_SCHEDULER_add_after (tc->sched,
164 GNUNET_NO, 163 GNUNET_NO,