Changeset 984a9ba in mainline for uspace/lib/c/generic/vfs/vfs.c


Ignore:
Timestamp:
2018-07-05T09:34:09Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63d46341
Parents:
76f566d
Message:

do not expose the call capability handler from the async framework

Keep the call capability handler encapsulated within the async framework
and do not expose it explicitly via its API. Use the pointer to
ipc_call_t as the sole object identifying an IPC call in the code that
uses the async framework.

This plugs a major leak in the abstraction and also simplifies both the
async framework (slightly) and all IPC servers.

File:
1 edited

Legend:

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

    r76f566d r984a9ba  
    802802errno_t vfs_receive_handle(bool high, int *handle)
    803803{
    804         cap_call_handle_t chandle;
    805         if (!async_state_change_receive(&chandle, NULL, NULL, NULL)) {
    806                 async_answer_0(chandle, EINVAL);
     804        ipc_call_t call;
     805        if (!async_state_change_receive(&call)) {
     806                async_answer_0(&call, EINVAL);
    807807                return EINVAL;
    808808        }
     
    810810        async_exch_t *vfs_exch = vfs_exchange_begin();
    811811
    812         async_state_change_finalize(chandle, vfs_exch);
     812        async_state_change_finalize(&call, vfs_exch);
    813813
    814814        sysarg_t ret;
Note: See TracChangeset for help on using the changeset viewer.