Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2530 → Rev 2531

/trunk/uspace/lib/libc/include/async.h
102,8 → 102,7
 
 
fid_t async_new_connection(ipcarg_t in_phone_hash,ipc_callid_t callid,
ipc_call_t *call,
void (*cthread)(ipc_callid_t,ipc_call_t *));
ipc_call_t *call, void (*cthread)(ipc_callid_t,ipc_call_t *));
void async_usleep(suseconds_t timeout);
void async_create_manager(void);
void async_destroy_manager(void);
/trunk/uspace/lib/libc/include/ipc/ipc.h
74,8 → 74,7
extern ipcarg_t ipc_answer(ipc_callid_t callid, ipc_call_t *call);
 
#define ipc_call_async(phoneid, method, arg1, private, callback, can_preempt) \
(ipc_call_async_2(phoneid, method, arg1, 0, private, callback, \
can_preempt))
(ipc_call_async_2(phoneid, method, arg1, 0, private, callback, can_preempt))
extern void ipc_call_async_2(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, void *private, ipc_async_callback_t callback,
int can_preempt);
90,10 → 89,10
extern int ipc_unregister_irq(int inr, int devno);
extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
ipcarg_t arg1);
 
extern int ipc_data_send_accept(ipc_callid_t *callid, ipc_call_t *call,
void **dst, size_t *size);
extern ipcarg_t ipc_data_send_answer(ipc_callid_t callid, ipc_call_t *call,
extern int ipc_data_send(int phoneid, void *src, size_t size);
extern int ipc_data_receive(ipc_callid_t *callid, ipc_call_t *call, void **dst,
size_t *size);
extern ipcarg_t ipc_data_deliver(ipc_callid_t callid, ipc_call_t *call,
void *dst, size_t size);
 
#endif
/trunk/uspace/lib/libc/generic/ipc.c
515,8 → 515,8
*/
int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phonehash)
{
return ipc_call_sync_3(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2, 0, 0, 0,
phonehash);
return ipc_call_sync_3(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2, 0, 0,
0, phonehash);
}
 
/** Ask through phone for a new connection to some service.
532,7 → 532,7
ipcarg_t newphid;
int res;
 
res = ipc_call_sync_3(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, 0, 0, 0,
res = ipc_call_sync_3(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, 0, 0, 0,
&newphid);
if (res)
return res;
595,9 → 595,23
return __SYSCALL4(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1);
}
 
/** Wrapper for accepting the IPC_M_DATA_SEND calls.
/** Wrapper for making IPC_M_DATA_SEND calls.
*
* This wrapper only makes it more comfortable to accept IPC_M_DATA_SEND calls
* @param phoneid Phone that will be used to contact the receiving side.
* @param src Address of the beginning of the source buffer.
* @param size Size of the source buffer.
*
* @return Zero on success or a negative error code from errno.h.
*/
int ipc_data_send(int phoneid, void *src, size_t size)
{
return ipc_call_sync_3(phoneid, IPC_M_DATA_SEND, 0, (ipcarg_t) src,
(ipcarg_t) size, NULL, NULL, NULL);
}
 
/** Wrapper for receiving the IPC_M_DATA_SEND calls.
*
* This wrapper only makes it more comfortable to receive IPC_M_DATA_SEND calls
* so that the user doesn't have to remember the meaning of each IPC argument.
*
* So far, this wrapper is to be used from within a connection fibril.
612,7 → 626,7
*
* @return Non-zero on success, zero on failure.
*/
int ipc_data_send_accept(ipc_callid_t *callid, ipc_call_t *call, void **dst,
int ipc_data_receive(ipc_callid_t *callid, ipc_call_t *call, void **dst,
size_t *size)
{
assert(callid);
640,7 → 654,8
*
* @return Zero on success or a value from @ref errno.h on failure.
*/
ipcarg_t ipc_data_send_answer(ipc_callid_t callid, ipc_call_t *call, void *dst, size_t size)
ipcarg_t ipc_data_deliver(ipc_callid_t callid, ipc_call_t *call, void *dst,
size_t size)
{
IPC_SET_RETVAL(*call, EOK);
IPC_SET_ARG1(*call, (ipcarg_t) dst);