Changeset 161ae09 in mainline


Ignore:
Timestamp:
2009-01-25T14:46:00Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
48daf64
Parents:
bffd91f
Message:

Optimize ipc.h.

File:
1 edited

Legend:

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

    rbffd91f r161ae09  
    4848typedef sysarg_t ipc_callid_t;
    4949
    50 typedef void (* ipc_async_callback_t)(void *private, int retval,
    51     ipc_call_t *data);
     50typedef void (* ipc_async_callback_t)(void *, int, ipc_call_t *);
    5251
    5352/*
     
    174173            (arg4), (arg5), (res1), (res2), (res3), (res4), (res5))
    175174
    176 extern int ipc_call_sync_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    177     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *result1, ipcarg_t *result2,
    178     ipcarg_t *result3, ipcarg_t *result4, ipcarg_t *result5);
    179 
    180 extern int ipc_call_sync_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
    181     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
    182     ipcarg_t *result1, ipcarg_t *result2, ipcarg_t *result3, ipcarg_t *result4,
    183     ipcarg_t *result5);
    184 
    185 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *call, uint32_t usec, int flags);
    186 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *data, uint32_t usec);
     175extern int ipc_call_sync_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
     176    ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *);
     177
     178extern int ipc_call_sync_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
     179    ipcarg_t, ipcarg_t, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *,
     180    ipcarg_t *);
     181
     182extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int);
     183extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t);
    187184static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data)
    188185{
    189186        return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
    190187}
    191 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *data);
     188extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
    192189
    193190/*
     
    210207    ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
    211208
    212 extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval,
    213     ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4);
    214 extern ipcarg_t ipc_answer_slow(ipc_callid_t callid, ipcarg_t retval,
    215     ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5);
     209extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
     210    ipcarg_t, ipcarg_t);
     211extern ipcarg_t ipc_answer_slow(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
     212    ipcarg_t, ipcarg_t, ipcarg_t);
    216213
    217214/*
     
    221218 * to m.
    222219 */
    223 #define ipc_call_async_0(phoneid, method, private, callback, \
    224     can_preempt) \
     220#define ipc_call_async_0(phoneid, method, private, callback, can_preempt) \
    225221        ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
    226222            (callback), (can_preempt))
     
    246242            (arg4), (arg5), (private), (callback), (can_preempt))
    247243
    248 extern void ipc_call_async_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    249     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, void *private,
    250     ipc_async_callback_t callback, int can_preempt);
    251 extern void ipc_call_async_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
    252     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, void *private,
    253     ipc_async_callback_t callback, int can_preempt);
    254 
    255 extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3,
    256     ipcarg_t *phone);
    257 extern int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3);
    258 extern int ipc_hangup(int phoneid);
    259 extern int ipc_register_irq(int inr, int devno, int method, irq_code_t *code);
    260 extern int ipc_unregister_irq(int inr, int devno);
    261 extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
    262     ipcarg_t arg1, ipcarg_t arg2, int mode);
     244extern void ipc_call_async_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
     245    ipcarg_t, void *, ipc_async_callback_t, int);
     246extern void ipc_call_async_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
     247    ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int);
     248
     249extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *);
     250extern int ipc_connect_me_to(int, int, int, int);
     251extern int ipc_hangup(int);
     252extern int ipc_register_irq(int, int, int, irq_code_t *);
     253extern int ipc_unregister_irq(int, int);
     254extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int);
    263255
    264256
     
    275267    ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
    276268
    277 extern int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
    278     int *flags);
    279 extern int ipc_share_in_receive(ipc_callid_t *callid, size_t *size);
    280 extern int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags);
    281 extern int ipc_share_out_start(int phoneid, void *src, int flags);
    282 extern int ipc_share_out_receive(ipc_callid_t *callid, size_t *size, int *flags);
    283 extern int ipc_share_out_finalize(ipc_callid_t callid, void *dst);
    284 extern int ipc_data_read_start(int phoneid, void *dst, size_t size);
    285 extern int ipc_data_read_receive(ipc_callid_t *callid, size_t *size);
    286 extern int ipc_data_read_finalize(ipc_callid_t callid, const void *src,
    287     size_t size);
    288 extern int ipc_data_write_start(int phoneid, const void *src, size_t size);
    289 extern int ipc_data_write_receive(ipc_callid_t *callid, size_t *size);
    290 extern int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size);
     269extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *);
     270extern int ipc_share_in_receive(ipc_callid_t *, size_t *);
     271extern int ipc_share_in_finalize(ipc_callid_t, void *, int );
     272extern int ipc_share_out_start(int, void *, int);
     273extern int ipc_share_out_receive(ipc_callid_t *, size_t *, int *);
     274extern int ipc_share_out_finalize(ipc_callid_t, void *);
     275extern int ipc_data_read_start(int, void *, size_t);
     276extern int ipc_data_read_receive(ipc_callid_t *, size_t *);
     277extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t);
     278extern int ipc_data_write_start(int, const void *, size_t);
     279extern int ipc_data_write_receive(ipc_callid_t *, size_t *);
     280extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);
    291281
    292282#include <task.h>
    293283
    294 extern int ipc_connect_kbox(task_id_t id);
     284extern int ipc_connect_kbox(task_id_t);
    295285
    296286#endif
Note: See TracChangeset for help on using the changeset viewer.