Changeset eadaeae8 in mainline for uspace/app/trace/ipcp.h


Ignore:
Timestamp:
2018-03-21T20:58:49Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3be9d10
Parents:
874381a
Message:

Make capability handles type-safe

Define distinct pointer types for the handles of the supported
capability types and use them instead of integer handles. This makes it
virtually impossible to pass a non-handle or a handle of different type
instead of the proper handle. Also turn cap_handle_t into an "untyped"
capability handle that can be assigned to and from the "typed" handles.

This commit also fixes a bug in msim-con driver, which wrongly used the
IRQ number instead of the IRQ capability handle to unregister the IRQ.

This commit also fixes the wrong use of the capability handle instead
of error code in libusbhost.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/ipcp.h

    r874381a readaeae8  
    4141void ipcp_cleanup(void);
    4242
    43 void ipcp_call_out(int phone, ipc_call_t *call, ipc_callid_t hash);
    44 void ipcp_call_sync(int phone, ipc_call_t *call, ipc_call_t *answer);
    45 void ipcp_call_in(ipc_call_t *call, ipc_callid_t hash);
    46 void ipcp_hangup(int phone, errno_t rc);
     43void ipcp_call_out(cap_phone_handle_t, ipc_call_t *, cap_call_handle_t);
     44void ipcp_call_sync(cap_phone_handle_t, ipc_call_t *call, ipc_call_t *answer);
     45void ipcp_call_in(ipc_call_t *call, cap_call_handle_t);
     46void ipcp_hangup(cap_phone_handle_t, errno_t);
    4747
    48 void ipcp_connection_set(int phone, int server, proto_t *proto);
    49 void ipcp_connection_clear(int phone);
     48void ipcp_connection_set(cap_phone_handle_t, int server, proto_t *proto);
     49void ipcp_connection_clear(cap_phone_handle_t);
    5050
    5151#endif
Note: See TracChangeset for help on using the changeset viewer.