aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_scheduler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
commit5746309cb4be2073d550ad7a6885e918631dbc38 (patch)
tree89455bc4aadf977816b38df13f990372cd81d71a /src/util/test_scheduler.c
parent6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff)
downloadgnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz
gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip
indentation
Diffstat (limited to 'src/util/test_scheduler.c')
-rw-r--r--src/util/test_scheduler.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c
index d5a701692..3d8ae979c 100644
--- a/src/util/test_scheduler.c
+++ b/src/util/test_scheduler.c
@@ -50,8 +50,8 @@ task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
50 GNUNET_assert (2 == *ok); 50 GNUNET_assert (2 == *ok);
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, 53 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_UI, &task3,
54 &task3, cls); 54 cls);
55} 55}
56 56
57static void 57static 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, 126 GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[0], &taskRd,
127 fds[0], &taskRd, cls); 127 cls);
128 GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, 128 GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[1],
129 fds[1], &taskWrt, cls); 129 &taskWrt, cls);
130} 130}
131 131
132 132
@@ -225,8 +225,8 @@ taskCancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
225 225
226 GNUNET_assert (1 == *ok); 226 GNUNET_assert (1 == *ok);
227 *ok = 0; 227 *ok = 0;
228 GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 228 GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_add_after
229 &taskNeverRun, NULL)); 229 (GNUNET_SCHEDULER_NO_TASK, &taskNeverRun, NULL));
230} 230}
231 231
232 232