178,7 → 178,6 |
|
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call); |
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call); |
static void default_pending(void); |
|
/** |
* Pointer to a fibril function that will be used to handle connections. |
191,12 → 190,6 |
*/ |
static async_client_conn_t interrupt_received = default_interrupt_received; |
|
/** |
* Pointer to a fibril function that will be used to handle pending |
* operations. |
*/ |
static async_pending_t pending = default_pending; |
|
static hash_table_t conn_hash_table; |
static LIST_INITIALIZE(timeout_list); |
|
381,42 → 374,6 |
return true; |
} |
|
/** Pending fibril. |
* |
* After each call the pending operations are executed in a separate |
* fibril. The function pending() is c. |
* |
* @param arg Unused. |
* |
* @return Always zero. |
* |
*/ |
static int pending_fibril(void *arg) |
{ |
pending(); |
|
return 0; |
} |
|
/** Process pending actions. |
* |
* A new fibril is created which would process the pending operations. |
* |
* @return False if an error occured. |
* True if the execution was passed to the pending fibril. |
* |
*/ |
static bool process_pending(void) |
{ |
futex_down(&async_futex); |
|
fid_t fid = fibril_create(pending_fibril, NULL); |
fibril_add_ready(fid); |
|
futex_up(&async_futex); |
return true; |
} |
|
/** Return new incoming message for the current (fibril-local) connection. |
* |
* @param call Storage where the incoming call data will be stored. |
513,15 → 470,6 |
{ |
} |
|
/** Default fibril function that gets called to handle pending operations. |
* |
* This function is defined as a weak symbol - to be redefined in user code. |
* |
*/ |
static void default_pending(void) |
{ |
} |
|
/** Wrapper for client connection fibril. |
* |
* When a new connection arrives, a fibril with this implementing function is |
660,7 → 608,7 |
return; |
|
out: |
process_pending(); |
; |
} |
|
/** Fire all timeouts that expired. */ |
1049,16 → 997,6 |
interrupt_received = intr; |
} |
|
/** Setter for pending function pointer. |
* |
* @param pend Function that will implement a new pending |
* operations fibril. |
*/ |
void async_set_pending(async_pending_t pend) |
{ |
pending = pend; |
} |
|
/** Pseudo-synchronous message sending - fast version. |
* |
* Send message asynchronously and return only after the reply arrives. |