ipc.c File Reference

#include <ipc/ipc.h>
#include <libc.h>
#include <malloc.h>
#include <errno.h>
#include <adt/list.h>
#include <futex.h>
#include <fibril.h>

Go to the source code of this file.

Data Structures

struct  async_call_t
 Structures of this type are used for keeping track of sent asynchronous calls and queing unsent calls. More...

Functions

static void dispatch_queued_calls (void)
 Try to dispatch queued calls from the async queue.
static void handle_answer (ipc_callid_t callid, ipc_call_t *data)
 Handle received answer.
sysarg_t ipc_answer_fast (ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
 Answer received call (fast version).
sysarg_t ipc_answer_slow (ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5)
 Answer received call (entire payload).
void ipc_call_async_fast (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, void *private, ipc_async_callback_t callback, bool can_preempt)
 Fast asynchronous call.
static ipc_callid_t ipc_call_async_internal (int phoneid, ipc_call_t *data)
 Send asynchronous message via syscall.
void ipc_call_async_slow (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, void *private, ipc_async_callback_t callback, bool can_preempt)
 Asynchronous call transmitting the entire payload.
int ipc_call_sync_fast (int phoneid, sysarg_t method, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *result1, sysarg_t *result2, sysarg_t *result3, sysarg_t *result4, sysarg_t *result5)
 Fast synchronous call.
int ipc_call_sync_slow (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *result1, sysarg_t *result2, sysarg_t *result3, sysarg_t *result4, sysarg_t *result5)
 Synchronous call transmitting 5 arguments of payload.
int ipc_connect_kbox (task_id_t id)
 Connect to a task specified by id.
int ipc_connect_me_to (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
 Request new connection.
int ipc_connect_me_to_blocking (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
 Request new connection (blocking).
int ipc_connect_to_me (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *taskhash, sysarg_t *phonehash)
 Request callback connection.
int ipc_data_read_finalize (ipc_callid_t callid, const void *src, size_t size)
 Wrapper for answering the IPC_M_DATA_READ calls.
int ipc_data_read_start (int phoneid, void *dst, size_t size)
 Wrapper for IPC_M_DATA_READ calls.
int ipc_data_write_finalize (ipc_callid_t callid, void *dst, size_t size)
 Wrapper for answering the IPC_M_DATA_WRITE calls.
int ipc_data_write_start (int phoneid, const void *src, size_t size)
 Wrapper for IPC_M_DATA_WRITE calls.
static void ipc_finish_async (ipc_callid_t callid, int phoneid, async_call_t *call, bool can_preempt)
 Epilog for ipc_call_async_*() functions.
int ipc_forward_fast (ipc_callid_t callid, int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode)
 Forward a received call to another destination.
int ipc_forward_slow (ipc_callid_t callid, int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, unsigned int mode)
int ipc_hangup (int phoneid)
 Hang up a phone.
void ipc_poke (void)
 Interrupt one thread of this task from waiting for IPC.
static async_call_tipc_prepare_async (void *private, ipc_async_callback_t callback)
 Prolog for ipc_call_async_*() functions.
int ipc_share_in_finalize (ipc_callid_t callid, void *src, unsigned int flags)
 Wrapper for answering the IPC_M_SHARE_IN calls.
int ipc_share_in_start (int phoneid, void *dst, size_t size, sysarg_t arg, unsigned int *flags)
 Wrapper for IPC_M_SHARE_IN calls.
int ipc_share_out_finalize (ipc_callid_t callid, void *dst)
 Wrapper for answering the IPC_M_SHARE_OUT calls.
int ipc_share_out_start (int phoneid, void *src, unsigned int flags)
 Wrapper for IPC_M_SHARE_OUT calls.
ipc_callid_t ipc_trywait_for_call (ipc_call_t *call)
 Check if there is an IPC call waiting to be picked up.
ipc_callid_t ipc_wait_cycle (ipc_call_t *call, sysarg_t usec, unsigned int flags)
 Wait for first IPC call to come.
ipc_callid_t ipc_wait_for_call_timeout (ipc_call_t *call, sysarg_t usec)
 Wait for first IPC call to come.
 LIST_INITIALIZE (queued_calls)
 List of asynchronous calls that were not accepted by kernel.

Variables

static atomic_t ipc_futex = FUTEX_INITIALIZER


Detailed Description

Definition in file ipc.c.


Generated on Thu Jun 2 07:45:53 2011 for HelenOS/USB by  doxygen 1.4.7