Rev 4509 | Rev 4528 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4509 | Rev 4510 | ||
|---|---|---|---|
| Line 548... | Line 548... | ||
| 548 | hash_table_remove(&conn_hash_table, &key, 1); |
548 | hash_table_remove(&conn_hash_table, &key, 1); |
| 549 | futex_up(&async_futex); |
549 | futex_up(&async_futex); |
| 550 | 550 | ||
| 551 | /* Answer all remaining messages with EHANGUP */ |
551 | /* Answer all remaining messages with EHANGUP */ |
| 552 | while (!list_empty(&FIBRIL_connection->msg_queue)) { |
552 | while (!list_empty(&FIBRIL_connection->msg_queue)) { |
| 553 | msg_t *msg |
553 | msg_t *msg; |
| 554 | = list_get_instance(FIBRIL_connection->msg_queue.next, msg_t, link); |
- | |
| 555 | 554 | ||
| - | 555 | msg = list_get_instance(FIBRIL_connection->msg_queue.next, |
|
| - | 556 | msg_t, link); |
|
| 556 | list_remove(&msg->link); |
557 | list_remove(&msg->link); |
| 557 | ipc_answer_0(msg->callid, EHANGUP); |
558 | ipc_answer_0(msg->callid, EHANGUP); |
| 558 | free(msg); |
559 | free(msg); |
| 559 | } |
560 | } |
| 560 | 561 | ||
| Line 715... | Line 716... | ||
| 715 | 716 | ||
| 716 | futex_down(&async_futex); |
717 | futex_down(&async_futex); |
| 717 | 718 | ||
| 718 | suseconds_t timeout; |
719 | suseconds_t timeout; |
| 719 | if (!list_empty(&timeout_list)) { |
720 | if (!list_empty(&timeout_list)) { |
| 720 | awaiter_t *waiter |
721 | awaiter_t *waiter = list_get_instance(timeout_list.next, |
| 721 | = list_get_instance(timeout_list.next, awaiter_t, link); |
722 | awaiter_t, link); |
| 722 | 723 | ||
| 723 | struct timeval tv; |
724 | struct timeval tv; |
| 724 | gettimeofday(&tv, NULL); |
725 | gettimeofday(&tv, NULL); |
| 725 | 726 | ||
| 726 | if (tv_gteq(&tv, &waiter->expires)) { |
727 | if (tv_gteq(&tv, &waiter->expires)) { |
| Line 733... | Line 734... | ||
| 733 | timeout = SYNCH_NO_TIMEOUT; |
734 | timeout = SYNCH_NO_TIMEOUT; |
| 734 | 735 | ||
| 735 | futex_up(&async_futex); |
736 | futex_up(&async_futex); |
| 736 | 737 | ||
| 737 | ipc_call_t call; |
738 | ipc_call_t call; |
| 738 | ipc_callid_t callid |
739 | ipc_callid_t callid = ipc_wait_cycle(&call, timeout, |
| 739 | = ipc_wait_cycle(&call, timeout, SYNCH_FLAGS_NONE); |
740 | SYNCH_FLAGS_NONE); |
| 740 | 741 | ||
| 741 | if (!callid) { |
742 | if (!callid) { |
| 742 | handle_expired_timeouts(); |
743 | handle_expired_timeouts(); |
| 743 | continue; |
744 | continue; |
| 744 | } |
745 | } |