Rev 1363 | Rev 1412 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1363 | Rev 1365 | ||
|---|---|---|---|
| Line 177... | Line 177... | ||
| 177 | "Pong6", got_answer); |
177 | "Pong6", got_answer); |
| 178 | printf("Waiting forever...\n"); |
178 | printf("Waiting forever...\n"); |
| 179 | for (i=0; i<100;i++) |
179 | for (i=0; i<100;i++) |
| 180 | printf("."); |
180 | printf("."); |
| 181 | printf("\n"); |
181 | printf("\n"); |
| 182 | ipc_wait_for_call(&data, NULL); |
182 | ipc_wait_for_call(&data); |
| 183 | printf("Received call???\n"); |
183 | printf("Received call???\n"); |
| 184 | } |
184 | } |
| 185 | 185 | ||
| 186 | 186 | ||
| 187 | static void got_answer_2(void *private, int retval, ipc_call_t *data) |
187 | static void got_answer_2(void *private, int retval, ipc_call_t *data) |
| Line 201... | Line 201... | ||
| 201 | printf("Result: %d - phonead: %llu\n", res, phonead); |
201 | printf("Result: %d - phonead: %llu\n", res, phonead); |
| 202 | for (i=0; i < 100; i++) { |
202 | for (i=0; i < 100; i++) { |
| 203 | printf("----------------\n"); |
203 | printf("----------------\n"); |
| 204 | ipc_call_async(PHONE_NS, NS_PING_SVC, 0, "prov", |
204 | ipc_call_async(PHONE_NS, NS_PING_SVC, 0, "prov", |
| 205 | got_answer_2); |
205 | got_answer_2); |
| 206 | callid = ipc_wait_for_call(&data, NULL); |
206 | callid = ipc_wait_for_call(&data); |
| 207 | printf("Received ping\n"); |
207 | printf("Received ping\n"); |
| 208 | ipc_answer_fast(callid, 0, 0, 0); |
208 | ipc_answer_fast(callid, 0, 0, 0); |
| 209 | } |
209 | } |
| 210 | // callid = ipc_wait_for_call(&data, NULL); |
210 | // callid = ipc_wait_for_call(&data, NULL); |
| 211 | } |
211 | } |
| Line 241... | Line 241... | ||
| 241 | ipc_hangup(phoneid); |
241 | ipc_hangup(phoneid); |
| 242 | printf("Connecting\n"); |
242 | printf("Connecting\n"); |
| 243 | phoneid = ipc_connect_me_to(PHONE_NS, 10, 20); |
243 | phoneid = ipc_connect_me_to(PHONE_NS, 10, 20); |
| 244 | printf("Newphid: %d\n", phoneid); |
244 | printf("Newphid: %d\n", phoneid); |
| 245 | for (i=0; i < 1000; i++) { |
245 | for (i=0; i < 1000; i++) { |
| 246 | if ((callid=ipc_wait_for_call(&data, IPC_WAIT_NONBLOCKING))) |
246 | if ((callid=ipc_trywait_for_call(&data))) |
| 247 | printf("callid: %d\n"); |
247 | printf("callid: %d\n"); |
| 248 | } |
248 | } |
| 249 | printf("New new phoneid: %d\n", ipc_connect_me_to(PHONE_NS, 10, 20)); |
249 | printf("New new phoneid: %d\n", ipc_connect_me_to(PHONE_NS, 10, 20)); |
| 250 | } |
250 | } |
| 251 | 251 | ||
| Line 264... | Line 264... | ||
| 264 | printf("ping2\n"); |
264 | printf("ping2\n"); |
| 265 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
265 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
| 266 | "Ping2", got_answer); |
266 | "Ping2", got_answer); |
| 267 | 267 | ||
| 268 | for (i=0; i < 1000; i++) { |
268 | for (i=0; i < 1000; i++) { |
| 269 | if ((callid=ipc_wait_for_call(&data, IPC_WAIT_NONBLOCKING))) |
269 | if ((callid=ipc_trywait_for_call(&data))) |
| 270 | printf("callid: %d\n"); |
270 | printf("callid: %d\n"); |
| 271 | } |
271 | } |
| 272 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
272 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
| 273 | "Pong1", got_answer); |
273 | "Pong1", got_answer); |
| 274 | printf("Closing file\n"); |
274 | printf("Closing file\n"); |
| 275 | ipc_hangup(PHONE_NS); |
275 | ipc_hangup(PHONE_NS); |
| 276 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
276 | ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, |
| 277 | "Pong1", got_answer); |
277 | "Pong1", got_answer); |
| 278 | ipc_wait_for_call(&data, 0); |
278 | ipc_wait_for_call(&data); |
| 279 | } |
279 | } |
| 280 | 280 | ||
| 281 | static int ptest(void *arg) |
281 | static int ptest(void *arg) |
| 282 | { |
282 | { |
| 283 | stage = 1; |
283 | stage = 1; |
| Line 392... | Line 392... | ||
| 392 | // test_connection_ipc(); |
392 | // test_connection_ipc(); |
| 393 | // test_hangup(); |
393 | // test_hangup(); |
| 394 | // test_slam(); |
394 | // test_slam(); |
| 395 | // test_as_send(); |
395 | // test_as_send(); |
| 396 | // test_pci(); |
396 | // test_pci(); |
| 397 | // test_kbd(); |
397 | test_kbd(); |
| 398 | // test_fb(); |
398 | // test_fb(); |
| 399 | 399 | ||
| 400 | printf("Hello\nThis is Init\n\nBye."); |
400 | printf("Hello\nThis is Init\n\nBye."); |
| 401 | 401 | ||
| 402 | 402 | ||