Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/ipc.h

    r8d2dd7f2 r569a51a  
    4444#include <abi/synch.h>
    4545#include <abi/proc/task.h>
     46#include <abi/cap.h>
    4647
    4748typedef void (*ipc_async_callback_t)(void *, int, ipc_call_t *);
    4849
    49 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, sysarg_t, unsigned int);
     50extern int ipc_wait_cycle(ipc_call_t *, sysarg_t, unsigned int);
    5051extern void ipc_poke(void);
    5152
     
    5354        ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
    5455
    55 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, sysarg_t);
    56 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
     56extern int ipc_wait_for_call_timeout(ipc_call_t *, sysarg_t);
     57extern int ipc_trywait_for_call(ipc_call_t *);
    5758
    5859/*
     
    6364 */
    6465
    65 #define ipc_answer_0(callid, retval) \
    66         ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
    67 #define ipc_answer_1(callid, retval, arg1) \
    68         ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
    69 #define ipc_answer_2(callid, retval, arg1, arg2) \
    70         ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
    71 #define ipc_answer_3(callid, retval, arg1, arg2, arg3) \
    72         ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
    73 #define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \
    74         ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
    75 #define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \
    76         ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
     66#define ipc_answer_0(chandle, retval) \
     67        ipc_answer_fast((chandle), (retval), 0, 0, 0, 0)
     68#define ipc_answer_1(chandle, retval, arg1) \
     69        ipc_answer_fast((chandle), (retval), (arg1), 0, 0, 0)
     70#define ipc_answer_2(chandle, retval, arg1, arg2) \
     71        ipc_answer_fast((chandle), (retval), (arg1), (arg2), 0, 0)
     72#define ipc_answer_3(chandle, retval, arg1, arg2, arg3) \
     73        ipc_answer_fast((chandle), (retval), (arg1), (arg2), (arg3), 0)
     74#define ipc_answer_4(chandle, retval, arg1, arg2, arg3, arg4) \
     75        ipc_answer_fast((chandle), (retval), (arg1), (arg2), (arg3), (arg4))
     76#define ipc_answer_5(chandle, retval, arg1, arg2, arg3, arg4, arg5) \
     77        ipc_answer_slow((chandle), (retval), (arg1), (arg2), (arg3), (arg4), \
     78            (arg5))
    7779
    78 extern sysarg_t ipc_answer_fast(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t,
     80extern sysarg_t ipc_answer_fast(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
    7981    sysarg_t, sysarg_t);
    80 extern sysarg_t ipc_answer_slow(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t,
     82extern sysarg_t ipc_answer_slow(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
    8183    sysarg_t, sysarg_t, sysarg_t);
    8284
     
    8890 */
    8991
    90 #define ipc_call_async_0(phoneid, method, private, callback) \
    91         ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
     92#define ipc_call_async_0(phandle, method, private, callback) \
     93        ipc_call_async_fast((phandle), (method), 0, 0, 0, (private), (callback))
     94#define ipc_call_async_1(phandle, method, arg1, private, callback) \
     95        ipc_call_async_fast((phandle), (method), (arg1), 0, 0, (private), \
    9296            (callback))
    93 #define ipc_call_async_1(phoneid, method, arg1, private, callback) \
    94         ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, 0, (private), \
    95             (callback))
    96 #define ipc_call_async_2(phoneid, method, arg1, arg2, private, callback) \
    97         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
     97#define ipc_call_async_2(phandle, method, arg1, arg2, private, callback) \
     98        ipc_call_async_fast((phandle), (method), (arg1), (arg2), 0, \
    9899            (private), (callback))
    99 #define ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback) \
    100         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
     100#define ipc_call_async_3(phandle, method, arg1, arg2, arg3, private, callback) \
     101        ipc_call_async_fast((phandle), (method), (arg1), (arg2), (arg3), \
    101102            (private), (callback))
    102 #define ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, \
     103#define ipc_call_async_4(phandle, method, arg1, arg2, arg3, arg4, private, \
    103104    callback) \
    104         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
    105             (arg4), (private), (callback))
    106 #define ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, \
     105        ipc_call_async_slow((phandle), (method), (arg1), (arg2), (arg3), \
     106            (arg4), 0, (private), (callback))
     107#define ipc_call_async_5(phandle, method, arg1, arg2, arg3, arg4, arg5, \
    107108    private, callback) \
    108         ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \
     109        ipc_call_async_slow((phandle), (method), (arg1), (arg2), (arg3), \
    109110            (arg4), (arg5), (private), (callback))
    110111
    111 extern void ipc_call_async_fast(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
     112extern void ipc_call_async_fast(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
    112113    sysarg_t, void *, ipc_async_callback_t);
    113 extern void ipc_call_async_slow(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    114     sysarg_t, sysarg_t, void *, ipc_async_callback_t);
     114extern void ipc_call_async_slow(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
     115    sysarg_t, sysarg_t, sysarg_t, void *, ipc_async_callback_t);
    115116
    116 extern int ipc_hangup(int);
     117extern int ipc_hangup(cap_handle_t);
    117118
    118 extern int ipc_forward_fast(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
    119     unsigned int);
    120 extern int ipc_forward_slow(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
    121     sysarg_t, sysarg_t, sysarg_t, unsigned int);
     119extern int ipc_forward_fast(cap_handle_t, cap_handle_t, sysarg_t, sysarg_t,
     120    sysarg_t, unsigned int);
     121extern int ipc_forward_slow(cap_handle_t, cap_handle_t, sysarg_t, sysarg_t,
     122    sysarg_t, sysarg_t, sysarg_t, sysarg_t, unsigned int);
    122123
    123 extern int ipc_connect_kbox(task_id_t);
     124extern int ipc_connect_kbox(task_id_t, cap_handle_t *);
    124125
    125126#endif
Note: See TracChangeset for help on using the changeset viewer.