Changeset 7c0e1f5 in mainline for kernel/generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2017-11-23T22:20:17Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1f36e3
Parents:
40e5d66
Message:

Rework userspace call tracking

Setting the address of the userspace call structure in the kernel
call_t structure on send allows us to remove lots of userspace
scaffolding. More importantly, it also opens the door for not needing
the callid (later capability) on answer receive.

File:
1 edited

Legend:

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

    r40e5d66 r7c0e1f5  
    347347/** Make a fast asynchronous call over IPC.
    348348 *
    349  * This function can only handle four arguments of payload, but is faster than
     349 * This function can only handle three arguments of payload, but is faster than
    350350 * the generic function sys_ipc_call_async_slow().
    351351 *
     
    355355 * @param arg2     Service-defined payload argument.
    356356 * @param arg3     Service-defined payload argument.
    357  * @param arg4     Service-defined payload argument.
     357 * @param label    User-defined label.
    358358 *
    359359 * @return Call hash on success.
     
    362362 */
    363363sysarg_t sys_ipc_call_async_fast(sysarg_t handle, sysarg_t imethod,
    364     sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
     364    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t label)
    365365{
    366366        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    378378        IPC_SET_ARG2(call->data, arg2);
    379379        IPC_SET_ARG3(call->data, arg3);
    380         IPC_SET_ARG4(call->data, arg4);
    381380       
    382381        /*
     
    385384         */
    386385        IPC_SET_ARG5(call->data, 0);
     386
     387        /* Set the user-defined label */
     388        call->data.label = label;
    387389       
    388390        int res = request_preprocess(call, kobj->phone);
     
    401403 * @param handle  Phone capability for the call.
    402404 * @param data    Userspace address of call data with the request.
     405 * @param label   User-defined label.
    403406 *
    404407 * @return See sys_ipc_call_async_fast().
    405408 *
    406409 */
    407 sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data)
     410sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data,
     411    sysarg_t label)
    408412{
    409413        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    424428                return (sysarg_t) rc;
    425429        }
     430
     431        /* Set the user-defined label */
     432        call->data.label = label;
    426433       
    427434        int res = request_preprocess(call, kobj->phone);
Note: See TracChangeset for help on using the changeset viewer.