/** Process pending wait requests */ void process_pending_wait(void) { task_exit_t texit; loop: list_foreach(pending_wait, link, pending_wait_t, pr) { ht_link_t *link = hash_table_find(&task_hash_table, &pr->id); if (!link) continue; hashed_task_t *ht = hash_table_get_inst(link, hashed_task_t, link); if (!ht->finished) continue; if (!(pr->callid & IPC_CALLID_NOTIFICATION)) { texit = ht->have_rval ? TASK_EXIT_NORMAL : TASK_EXIT_UNEXPECTED; ipc_answer_2(pr->callid, EOK, texit, ht->retval); } list_remove(&pr->link); free(pr); goto loop; }
/** Process pending wait requests */ void process_pending_wait(void) { task_exit_t texit; loop: list_foreach(pending_wait, cur) { pending_wait_t *pr = list_get_instance(cur, pending_wait_t, link); unsigned long keys[2] = { LOWER32(pr->id), UPPER32(pr->id) }; link_t *link = hash_table_find(&task_hash_table, keys); if (!link) continue; hashed_task_t *ht = hash_table_get_instance(link, hashed_task_t, link); if (!ht->finished) continue; if (!(pr->callid & IPC_CALLID_NOTIFICATION)) { texit = ht->have_rval ? TASK_EXIT_NORMAL : TASK_EXIT_UNEXPECTED; ipc_answer_2(pr->callid, EOK, texit, ht->retval); } hash_table_remove(&task_hash_table, keys, 2); list_remove(cur); free(pr); goto loop; }