Changeset ff381a7 in mainline for uspace/lib/c/include/async.h


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3feeab2 rff381a7  
    4848#include <abi/ddi/irq.h>
    4949#include <abi/ipc/event.h>
     50#include <abi/ipc/interfaces.h>
    5051
    5152typedef ipc_callid_t aid_t;
     53typedef sysarg_t port_id_t;
    5254
    5355typedef void *(*async_client_data_ctor_t)(void);
    5456typedef void (*async_client_data_dtor_t)(void *);
    5557
    56 /** Client connection handler
     58/** Port connection handler
    5759 *
    5860 * @param callid ID of incoming call or 0 if connection initiated from
    59  *               inside using async_connect_to_me()
     61 *               inside using async_create_callback_port()
    6062 * @param call   Incoming call or 0 if connection initiated from inside
    61  * @param arg    Local argument passed from async_new_connection() or
    62  *               async_connect_to_me()
    63  */
    64 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *, void *);
     63 *               using async_create_callback_port()
     64 * @param arg    Local argument.
     65 *
     66 */
     67typedef void (*async_port_handler_t)(ipc_callid_t, ipc_call_t *, void *);
    6568
    6669/** Notification handler */
     
    8083        EXCHANGE_ATOMIC = 0,
    8184       
     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       
    8293        /** Exchange management via phone cloning
    8394         *
     
    8798         *
    8899         */
    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
     100        EXCHANGE_PARALLEL = 2
    98101} exch_mgmt_t;
    99102
     
    147150extern void async_forget(aid_t);
    148151
    149 extern 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 void async_set_client_connection(async_client_conn_t);
     162extern int async_create_port(iface_t, async_port_handler_t, void *,
     163    port_id_t *);
     164extern void async_set_fallback_port_handler(async_port_handler_t, void *);
     165extern int async_create_callback_port(async_exch_t *, iface_t, sysarg_t,
     166    sysarg_t, async_port_handler_t, void *, port_id_t *);
     167
    163168extern void async_set_notification_handler_stack_size(size_t);
    164169
     
    343348extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t,
    344349    sysarg_t, sysarg_t);
     350extern async_sess_t *async_connect_me_to_iface(async_exch_t *, iface_t,
     351    sysarg_t, sysarg_t);
    345352extern async_sess_t *async_connect_me_to_blocking(exch_mgmt_t, async_exch_t *,
    346353    sysarg_t, sysarg_t, sysarg_t);
     354extern async_sess_t *async_connect_me_to_blocking_iface(async_exch_t *, iface_t,
     355    sysarg_t, sysarg_t);
    347356extern async_sess_t *async_connect_kbox(task_id_t);
    348357
    349 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t,
    350     async_client_conn_t, void *);
     358extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t);
    351359
    352360extern int async_hangup(async_sess_t *);
Note: See TracChangeset for help on using the changeset viewer.