Lines Matching refs:chan
37 static void send_cmd(struct handle* chan, in send_cmd() argument
44 int rc = ktipc_send(chan, &req, sizeof(req), buf, len); in send_cmd()
51 static void wait_for_hup(struct handle* chan) { in wait_for_hup() argument
55 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in wait_for_hup()
64 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in wait_for_hup()
79 struct handle* chan = NULL; in TEST() local
83 &chan); in TEST()
86 wait_for_hup(chan); in TEST()
90 if (chan) { in TEST()
91 handle_decref(chan); in TEST()
98 struct handle* chan = NULL; in TEST() local
106 &chan); in TEST()
109 wait_for_hup(chan); in TEST()
113 if (chan) { in TEST()
114 handle_decref(chan); in TEST()
120 struct handle* chan[NUM_TEST_CONNECTIONS] = { in TEST() local
128 IPC_CONNECT_WAIT_FOR_PORT, &chan[i]); in TEST()
131 rc = handle_wait(chan[i], &event, TIMEOUT_MSEC); in TEST()
141 send_cmd(chan[i], KTIPC_TEST_CMD_ECHO, test_pattern, len); in TEST()
144 rc = handle_wait(chan[i], &event, TIMEOUT_MSEC); in TEST()
149 rc = ktipc_recv(chan[i], len, buf, len); in TEST()
157 if (chan[i]) { in TEST()
158 handle_decref(chan[i]); in TEST()
166 struct handle* chan = NULL; in TEST() local
171 &chan); in TEST()
174 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
187 rc = ktipc_send(chan, &req, sizeof(req), test_pattern, 4, test_pattern + 4, in TEST()
193 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
205 rc = ktipc_recv(chan, len, buf4[0], 4, buf4[1], 4, buf4[2], 4, buf4[3], 4, in TEST()
218 if (chan) { in TEST()
219 handle_decref(chan); in TEST()
225 struct handle* chan = NULL; in TEST() local
231 &chan); in TEST()
234 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
238 send_cmd(chan, KTIPC_TEST_CMD_READ_CLOSE_COUNTER, NULL, 0); in TEST()
241 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
245 rc = ktipc_recv(chan, sizeof(start_close_counter), &start_close_counter, in TEST()
250 handle_decref(chan); in TEST()
251 chan = NULL; in TEST()
256 &chan); in TEST()
259 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
263 send_cmd(chan, KTIPC_TEST_CMD_CLOSE, NULL, 0); in TEST()
266 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
270 handle_decref(chan); in TEST()
271 chan = NULL; in TEST()
276 &chan); in TEST()
279 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
283 send_cmd(chan, KTIPC_TEST_CMD_READ_CLOSE_COUNTER, NULL, 0); in TEST()
286 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
290 rc = ktipc_recv(chan, sizeof(end_close_counter), &end_close_counter, in TEST()
296 if (chan) { in TEST()
297 handle_decref(chan); in TEST()
303 struct handle* chan = NULL; in TEST() local
308 &chan); in TEST()
311 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
317 send_cmd(chan, KTIPC_TEST_CMD_ECHO, test_pattern, len); in TEST()
320 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
328 send_cmd(chan, KTIPC_TEST_CMD_ECHO, test_pattern, len); in TEST()
335 rc = ktipc_recv(chan, len, buf, len); in TEST()
339 rc = handle_wait(chan, &event, TIMEOUT_MSEC); in TEST()
343 rc = ktipc_recv(chan, len, buf, len); in TEST()
348 if (chan) { in TEST()
349 handle_decref(chan); in TEST()