Changeset 984a9ba in mainline for uspace/srv/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/srv/vfs/vfs.c

    r76f566d r984a9ba  
    5555#define NAME  "vfs"
    5656
    57 static void vfs_pager(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     57static void vfs_pager(ipc_call_t *icall, void *arg)
    5858{
    59         async_answer_0(icall_handle, EOK);
     59        async_answer_0(icall, EOK);
    6060
    6161        while (true) {
    6262                ipc_call_t call;
    63                 cap_call_handle_t chandle = async_get_call(&call);
     63                async_get_call(&call);
    6464
    6565                if (!IPC_GET_IMETHOD(call))
     
    6868                switch (IPC_GET_IMETHOD(call)) {
    6969                case IPC_M_PAGE_IN:
    70                         vfs_page_in(chandle, &call);
     70                        vfs_page_in(&call);
    7171                        break;
    7272                default:
    73                         async_answer_0(chandle, ENOTSUP);
     73                        async_answer_0(&call, ENOTSUP);
    7474                        break;
    7575                }
     
    8888int main(int argc, char **argv)
    8989{
    90         errno_t rc;
    91 
    9290        printf("%s: HelenOS VFS server\n", NAME);
    9391
     
    122120         */
    123121        port_id_t port;
    124         rc = async_create_port(INTERFACE_PAGER, vfs_pager, NULL, &port);
     122        errno_t rc = async_create_port(INTERFACE_PAGER, vfs_pager, NULL, &port);
    125123        if (rc != EOK) {
    126124                printf("%s: Cannot create pager port: %s\n", NAME, str_error(rc));
Note: See TracChangeset for help on using the changeset viewer.