Changeset 04a73cdf in mainline
- Timestamp:
- 2006-05-17T14:05:01Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04552a80
- Parents:
- afa6e74
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
rafa6e74 r04a73cdf 164 164 static int vfb_no=1; 165 165 166 callid = ipc_wait_for_call(&call , 0);166 callid = ipc_wait_for_call(&call); 167 167 // printf("%s:Call phone=%lX..", NAME, call.in_phone_hash); 168 168 switch (IPC_GET_METHOD(call)&((1<<METHOD_WIDTH)-1)) { -
init/init.c
rafa6e74 r04a73cdf 180 180 printf("."); 181 181 printf("\n"); 182 ipc_wait_for_call(&data , NULL);182 ipc_wait_for_call(&data); 183 183 printf("Received call???\n"); 184 184 } … … 204 204 ipc_call_async(PHONE_NS, NS_PING_SVC, 0, "prov", 205 205 got_answer_2); 206 callid = ipc_wait_for_call(&data , NULL);206 callid = ipc_wait_for_call(&data); 207 207 printf("Received ping\n"); 208 208 ipc_answer_fast(callid, 0, 0, 0); … … 244 244 printf("Newphid: %d\n", phoneid); 245 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 247 printf("callid: %d\n"); 248 248 } … … 267 267 268 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 270 printf("callid: %d\n"); 271 271 } … … 276 276 ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2, 277 277 "Pong1", got_answer); 278 ipc_wait_for_call(&data , 0);278 ipc_wait_for_call(&data); 279 279 } 280 280 … … 395 395 // test_as_send(); 396 396 // test_pci(); 397 //test_kbd();397 test_kbd(); 398 398 // test_fb(); 399 399 -
kbd/generic/kbd.c
rafa6e74 r04a73cdf 79 79 80 80 while (1) { 81 callid = ipc_wait_for_call(&call , 0);81 callid = ipc_wait_for_call(&call); 82 82 // printf("%s:Call phone=%lX..", NAME, call.in_phone_hash); 83 83 switch (IPC_GET_METHOD(call)) { -
libc/generic/ipc.c
rafa6e74 r04a73cdf 35 35 #include <unistd.h> 36 36 #include <futex.h> 37 #include <kernel/synch/synch.h> 37 38 38 39 /** Structure used for keeping track of sent async msgs … … 252 253 253 254 254 /** Wait for IPC call and return255 /** Unconditionally wait for an IPC call. 255 256 * 256 257 * - dispatch ASYNC reoutines in the background 257 * @param data Space where the message is stored 258 * @return Callid or 0 if nothing available and started with 259 * IPC_WAIT_NONBLOCKING 260 */ 261 ipc_callid_t ipc_wait_for_call(ipc_call_t *call, int flags) 258 * @param call Space where the message is stored 259 * @return Callid of the answer. 260 */ 261 ipc_callid_t ipc_wait_for_call(ipc_call_t *call) 262 262 { 263 263 ipc_callid_t callid; … … 266 266 try_dispatch_queued_calls(); 267 267 268 callid = __SYSCALL2(SYS_IPC_WAIT, (sysarg_t)call, flags); 268 callid = __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, SYNCH_NO_TIMEOUT, SYNCH_BLOCKING); 269 /* Handle received answers */ 270 if (callid & IPC_CALLID_ANSWERED) 271 handle_answer(callid, call); 272 } while (callid & IPC_CALLID_ANSWERED); 273 274 return callid; 275 } 276 277 /** Wait some time for an IPC call. 278 * 279 * - dispatch ASYNC reoutines in the background 280 * @param call Space where the message is stored 281 * @param usec Timeout in microseconds. 282 * @return Callid of the answer. 283 */ 284 ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *call, uint32_t usec) 285 { 286 ipc_callid_t callid; 287 288 do { 289 try_dispatch_queued_calls(); 290 291 callid = __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, SYNCH_BLOCKING); 292 /* Handle received answers */ 293 if (callid & IPC_CALLID_ANSWERED) 294 handle_answer(callid, call); 295 } while (callid & IPC_CALLID_ANSWERED); 296 297 return callid; 298 } 299 300 /** Check if there is an IPC call waiting to be picked up. 301 * 302 * - dispatch ASYNC reoutines in the background 303 * @param call Space where the message is stored 304 * @return Callid of the answer. 305 */ 306 ipc_callid_t ipc_trywait_for_call(ipc_call_t *call) 307 { 308 ipc_callid_t callid; 309 310 do { 311 try_dispatch_queued_calls(); 312 313 callid = __SYSCALL3(SYS_IPC_WAIT, (sysarg_t)call, SYNCH_NO_TIMEOUT, SYNCH_NON_BLOCKING); 269 314 /* Handle received answers */ 270 315 if (callid & IPC_CALLID_ANSWERED) -
libc/include/ipc/ipc.h
rafa6e74 r04a73cdf 54 54 extern int ipc_call_sync(int phoneid, ipcarg_t method, ipcarg_t arg1, 55 55 ipcarg_t *result); 56 extern ipc_callid_t ipc_wait_for_call(ipc_call_t *data, int flags); 56 extern ipc_callid_t ipc_wait_for_call(ipc_call_t *data); 57 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *data, uint32_t usec); 58 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *data); 59 57 60 extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1, 58 61 ipcarg_t arg2); -
ns/ns.c
rafa6e74 r04a73cdf 92 92 93 93 while (1) { 94 callid = ipc_wait_for_call(&call , 0);94 callid = ipc_wait_for_call(&call); 95 95 // printf("NS: Call in_phone_hash=%lX...", call.in_phone_hash); 96 96 switch (IPC_GET_METHOD(call)) { -
pci/pci.c
rafa6e74 r04a73cdf 66 66 int retval; 67 67 68 callid = ipc_wait_for_call(&call , 0);68 callid = ipc_wait_for_call(&call); 69 69 switch(IPC_GET_METHOD(call)) { 70 70 case IPC_M_CONNECT_ME_TO:
Note:
See TracChangeset
for help on using the changeset viewer.