Changes in uspace/lib/c/include/async.h [c170438:1c635d6] in mainline
- File:
-
- 1 edited
-
uspace/lib/c/include/async.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/async.h
rc170438 r1c635d6 48 48 #include <abi/ddi/irq.h> 49 49 #include <abi/ipc/event.h> 50 #include <abi/ipc/interfaces.h>51 50 52 51 typedef ipc_callid_t aid_t; 53 typedef sysarg_t port_id_t;54 52 55 53 typedef void *(*async_client_data_ctor_t)(void); 56 54 typedef void (*async_client_data_dtor_t)(void *); 57 55 58 /** Port connection handler56 /** Client connection handler 59 57 * 60 58 * @param callid ID of incoming call or 0 if connection initiated from 61 * inside using async_c reate_callback_port()59 * inside using async_connect_to_me() 62 60 * @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 */ 64 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *, void *); 68 65 69 66 /** Notification handler */ … … 83 80 EXCHANGE_ATOMIC = 0, 84 81 85 /** Exchange management via mutual exclusion86 *87 * Suitable for any kind of client/server communication,88 * but can limit parallelism.89 *90 */91 EXCHANGE_SERIALIZE = 1,92 93 82 /** Exchange management via phone cloning 94 83 * … … 98 87 * 99 88 */ 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 101 98 } exch_mgmt_t; 102 99 … … 111 108 112 109 #define async_manager() \ 113 do { \ 114 futex_down(&async_futex); \ 115 fibril_switch(FIBRIL_FROM_DEAD); \ 116 } while (0) 110 fibril_switch(FIBRIL_TO_MANAGER) 117 111 118 112 #define async_get_call(data) \ … … 150 144 extern void async_forget(aid_t); 151 145 146 extern fid_t async_new_connection(task_id_t, sysarg_t, ipc_callid_t, 147 ipc_call_t *, async_client_conn_t, void *); 148 152 149 extern void async_usleep(suseconds_t); 153 150 extern void async_create_manager(void); … … 160 157 extern void async_put_client_data_by_id(task_id_t); 161 158 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 *); 159 extern void async_set_client_connection(async_client_conn_t); 160 extern void async_set_notification_handler_stack_size(size_t); 167 161 168 162 extern int async_irq_subscribe(int, int, async_notification_handler_t, void *, … … 346 340 extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t, 347 341 sysarg_t, sysarg_t); 348 extern async_sess_t *async_connect_me_to_iface(async_exch_t *, iface_t,349 sysarg_t, sysarg_t);350 342 extern async_sess_t *async_connect_me_to_blocking(exch_mgmt_t, async_exch_t *, 351 343 sysarg_t, sysarg_t, sysarg_t); 352 extern async_sess_t *async_connect_me_to_blocking_iface(async_exch_t *, iface_t,353 sysarg_t, sysarg_t);354 344 extern async_sess_t *async_connect_kbox(task_id_t); 355 345 356 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t); 346 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t, 347 async_client_conn_t, void *); 357 348 358 349 extern int async_hangup(async_sess_t *);
Note:
See TracChangeset
for help on using the changeset viewer.
