Changeset 436a0a5 in mainline for kernel/generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2018-11-09T22:04:01Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95d45482
Parents:
88e43bc (diff), abf6c01 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

(merge) Reduce the number of blocking allocations in the kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    r88e43bc r436a0a5  
    267267 * @return EOK on success.
    268268 * @return ENOENT if there is no such phone handle.
     269 * @return ENOMEM if not enough memory to make the call
    269270 *
    270271 */
     
    276277                return ENOENT;
    277278
    278         call_t *call = ipc_call_alloc(0);
     279        call_t *call = ipc_call_alloc();
     280        if (!call) {
     281                kobject_put(kobj);
     282                return ENOMEM;
     283        }
     284
    279285        call->priv = priv;
    280286        memcpy(call->data.args, data->args, sizeof(data->args));
     
    373379        }
    374380
    375         call_t *call = ipc_call_alloc(0);
     381        call_t *call = ipc_call_alloc();
     382        if (!call) {
     383                kobject_put(kobj);
     384                return ENOMEM;
     385        }
     386
    376387        IPC_SET_IMETHOD(call->data, imethod);
    377388        IPC_SET_ARG1(call->data, arg1);
     
    420431        }
    421432
    422         call_t *call = ipc_call_alloc(0);
     433        call_t *call = ipc_call_alloc();
     434        if (!call) {
     435                kobject_put(kobj);
     436                return ENOMEM;
     437        }
     438
    423439        errno_t rc = copy_from_uspace(&call->data.args, &data->args,
    424440            sizeof(call->data.args));
Note: See TracChangeset for help on using the changeset viewer.