Changeset 984a9ba in mainline for uspace/lib/drv/generic/remote_usb.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/drv/generic/remote_usb.c

    r76f566d r984a9ba  
    9595}
    9696
    97 static void remote_usb_get_my_description(ddf_fun_t *, void *,
    98     cap_call_handle_t, ipc_call_t *);
     97static void remote_usb_get_my_description(ddf_fun_t *, void *, ipc_call_t *);
    9998
    10099/** Remote USB interface operations. */
     
    111110
    112111void remote_usb_get_my_description(ddf_fun_t *fun, void *iface,
    113     cap_call_handle_t chandle, ipc_call_t *call)
     112    ipc_call_t *call)
    114113{
    115114        const usb_iface_t *usb_iface = (usb_iface_t *) iface;
    116115
    117116        if (usb_iface->get_my_description == NULL) {
    118                 async_answer_0(chandle, ENOTSUP);
     117                async_answer_0(call, ENOTSUP);
    119118                return;
    120119        }
     
    123122        const errno_t ret = usb_iface->get_my_description(fun, &desc);
    124123        if (ret != EOK) {
    125                 async_answer_0(chandle, ret);
     124                async_answer_0(call, ret);
    126125        } else {
    127                 async_answer_5(chandle, EOK,
     126                async_answer_5(call, EOK,
    128127                    (sysarg_t) desc.address,
    129128                    (sysarg_t) desc.depth,
Note: See TracChangeset for help on using the changeset viewer.