Ignore:
File:
1 edited

Legend:

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

    r9ef495f rc721d26  
    4848#include <abi/ddi/irq.h>
    4949#include <abi/ipc/event.h>
    50 #include <abi/ipc/interfaces.h>
    5150
    5251typedef ipc_callid_t aid_t;
    53 typedef sysarg_t port_id_t;
    5452
    5553typedef void *(*async_client_data_ctor_t)(void);
    5654typedef void (*async_client_data_dtor_t)(void *);
    5755
    58 /** Port connection handler
     56/** Client connection handler
    5957 *
    6058 * @param callid ID of incoming call or 0 if connection initiated from
    61  *               inside using async_create_callback_port()
     59 *               inside using async_connect_to_me()
    6260 * @param call   Incoming call or 0 if connection initiated from inside
    63  *               using async_create_callback_port()
    64  * @param arg    Local argument.
    65  *
    66  */
    67 typedef void (*async_port_handler_t)(ipc_callid_t, ipc_call_t *, void *);
     61 * @param arg    Local argument passed from async_new_connection() or
     62 *               async_connect_to_me()
     63 */
     64typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *, void *);
    6865
    6966/** Notification handler */
     
    8380        EXCHANGE_ATOMIC = 0,
    8481       
    85         /** Exchange management via mutual exclusion
    86          *
    87          * Suitable for any kind of client/server communication,
    88          * but can limit parallelism.
    89          *
    90          */
    91         EXCHANGE_SERIALIZE = 1,
    92        
    9382        /** Exchange management via phone cloning
    9483         *
     
    9887         *
    9988         */
    100         EXCHANGE_PARALLEL = 2
     89        EXCHANGE_PARALLEL,
     90       
     91        /** Exchange management via mutual exclusion
     92         *
     93         * Suitable for any kind of client/server communication,
     94         * but can limit parallelism.
     95         *
     96         */
     97        EXCHANGE_SERIALIZE
    10198} exch_mgmt_t;
    10299
     
    150147extern void async_forget(aid_t);
    151148
     149extern fid_t async_new_connection(task_id_t, sysarg_t, ipc_callid_t,
     150    ipc_call_t *, async_client_conn_t, void *);
     151
    152152extern void async_usleep(suseconds_t);
    153153extern void async_create_manager(void);
     
    160160extern void async_put_client_data_by_id(task_id_t);
    161161
    162 extern int async_create_port(iface_t, async_port_handler_t, void *,
    163     port_id_t *);
    164 extern void async_set_fallback_port_handler(async_port_handler_t, void *);
    165 extern int async_create_callback_port(async_exch_t *, iface_t, sysarg_t,
    166     sysarg_t, async_port_handler_t, void *, port_id_t *);
    167 
     162extern void async_set_client_connection(async_client_conn_t);
    168163extern void async_set_notification_handler_stack_size(size_t);
    169164
     
    348343extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t,
    349344    sysarg_t, sysarg_t);
    350 extern async_sess_t *async_connect_me_to_iface(async_exch_t *, iface_t,
    351     sysarg_t, sysarg_t);
    352345extern async_sess_t *async_connect_me_to_blocking(exch_mgmt_t, async_exch_t *,
    353346    sysarg_t, sysarg_t, sysarg_t);
    354 extern async_sess_t *async_connect_me_to_blocking_iface(async_exch_t *, iface_t,
    355     sysarg_t, sysarg_t);
    356347extern async_sess_t *async_connect_kbox(task_id_t);
    357348
    358 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t);
     349extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t,
     350    async_client_conn_t, void *);
    359351
    360352extern int async_hangup(async_sess_t *);
Note: See TracChangeset for help on using the changeset viewer.