Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r9c31643 r8bf1eeb  
    430430       
    431431        fid_t fid = fibril_create(notification_fibril, msg);
     432        if (fid == 0) {
     433                free(msg);
     434                futex_up(&async_futex);
     435                return false;
     436        }
     437       
    432438        fibril_add_ready(fid);
    433439       
     
    681687        conn->wdata.fid = fibril_create(connection_fibril, conn);
    682688       
    683         if (!conn->wdata.fid) {
     689        if (conn->wdata.fid == 0) {
    684690                free(conn);
     691               
    685692                if (callid)
    686693                        ipc_answer_0(callid, ENOMEM);
     694               
    687695                return (uintptr_t) NULL;
    688696        }
     
    853861{
    854862        fid_t fid = fibril_create(async_manager_fibril, NULL);
    855         fibril_add_manager(fid);
     863        if (fid != 0)
     864                fibril_add_manager(fid);
    856865}
    857866
     
    15581567}
    15591568
     1569/** Start IPC_M_DATA_READ using the async framework.
     1570 *
     1571 * @param phoneid Phone that will be used to contact the receiving side.
     1572 * @param dst Address of the beginning of the destination buffer.
     1573 * @param size Size of the destination buffer (in bytes).
     1574 * @param dataptr Storage of call data (arg 2 holds actual data size).
     1575 * @return Hash of the sent message or 0 on error.
     1576 */
     1577aid_t async_data_read(int phoneid, void *dst, size_t size, ipc_call_t *dataptr)
     1578{
     1579        return async_send_2(phoneid, IPC_M_DATA_READ, (sysarg_t) dst,
     1580            (sysarg_t) size, dataptr);
     1581}
     1582
    15601583/** Wrapper for IPC_M_DATA_READ calls using the async framework.
    15611584 *
Note: See TracChangeset for help on using the changeset viewer.