Rev 1461 | Rev 1568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1461 | Rev 1502 | ||
|---|---|---|---|
| Line 500... | Line 500... | ||
| 500 | 500 | ||
| 501 | /** Wait for incoming ipc call or answer |
501 | /** Wait for incoming ipc call or answer |
| 502 | * |
502 | * |
| 503 | * @param calldata Pointer to buffer where the call/answer data is stored |
503 | * @param calldata Pointer to buffer where the call/answer data is stored |
| 504 | * @param usec Timeout. See waitq_sleep_timeout() for explanation. |
504 | * @param usec Timeout. See waitq_sleep_timeout() for explanation. |
| 505 | * @param nonblocking See waitq_sleep_timeout() for explanation. |
505 | * @param flags Select mode of sleep operation. See waitq_sleep_timeout() for explanation. |
| 506 | * |
506 | * |
| 507 | * @return Callid, if callid & 1, then the call is answer |
507 | * @return Callid, if callid & 1, then the call is answer |
| 508 | */ |
508 | */ |
| 509 | __native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int nonblocking) |
509 | __native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int flags) |
| 510 | { |
510 | { |
| 511 | call_t *call; |
511 | call_t *call; |
| 512 | 512 | ||
| 513 | restart: |
513 | restart: |
| 514 | call = ipc_wait_for_call(&TASK->answerbox, usec, nonblocking); |
514 | call = ipc_wait_for_call(&TASK->answerbox, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE); |
| 515 | if (!call) |
515 | if (!call) |
| 516 | return 0; |
516 | return 0; |
| 517 | 517 | ||
| 518 | if (call->flags & IPC_CALL_NOTIF) { |
518 | if (call->flags & IPC_CALL_NOTIF) { |
| 519 | ASSERT(! (call->flags & IPC_CALL_STATIC_ALLOC)); |
519 | ASSERT(! (call->flags & IPC_CALL_STATIC_ALLOC)); |