Changes in uspace/lib/c/include/async.h [93ad49a8:8869f7b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/async.h
r93ad49a8 r8869f7b 42 42 #include <ipc/common.h> 43 43 #include <fibril.h> 44 #include <fibril_synch.h> 44 45 #include <sys/time.h> 45 46 #include <atomic.h> … … 52 53 typedef void (*async_client_data_dtor_t)(void *); 53 54 54 /** Client connection handler 55 * 56 * @param callid ID of incoming call or 0 if connection initiated from 57 * inside using async_connect_to_me() 58 * @param call Incoming call or 0 if connection initiated from inside 59 * @param arg Local argument passed from async_new_connection() or 60 * async_connect_to_me() 61 */ 62 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *, void *); 63 64 /** Interrupt handler */ 65 typedef void (*async_interrupt_handler_t)(ipc_callid_t, ipc_call_t *); 55 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *); 66 56 67 57 /** Exchange management style … … 95 85 } exch_mgmt_t; 96 86 97 /** Forward declarations */ 98 struct _async_exch; 99 struct _async_sess; 100 101 typedef struct _async_sess async_sess_t; 102 typedef struct _async_exch async_exch_t; 87 /** Session data */ 88 typedef struct { 89 /** List of inactive exchanges */ 90 link_t exch_list; 91 92 /** Exchange management style */ 93 exch_mgmt_t mgmt; 94 95 /** Session identification */ 96 int phone; 97 98 /** First clone connection argument */ 99 sysarg_t arg1; 100 101 /** Second clone connection argument */ 102 sysarg_t arg2; 103 104 /** Third clone connection argument */ 105 sysarg_t arg3; 106 107 /** Exchange mutex */ 108 fibril_mutex_t mutex; 109 110 /** Number of opened exchanges */ 111 atomic_t refcnt; 112 } async_sess_t; 113 114 /** Exchange data */ 115 typedef struct { 116 /** Link into list of inactive exchanges */ 117 link_t sess_link; 118 119 /** Link into global list of inactive exchanges */ 120 link_t global_link; 121 122 /** Session pointer */ 123 async_sess_t *sess; 124 125 /** Exchange identification */ 126 int phone; 127 } async_exch_t; 103 128 104 129 extern atomic_t threads_in_ipc_wait; … … 140 165 extern int async_wait_timeout(aid_t, sysarg_t *, suseconds_t); 141 166 142 extern fid_t async_new_connection( task_id_t, sysarg_t, ipc_callid_t,143 ipc_call_t *, async_client_conn_t , void *);167 extern fid_t async_new_connection(sysarg_t, sysarg_t, ipc_callid_t, 168 ipc_call_t *, async_client_conn_t); 144 169 145 170 extern void async_usleep(suseconds_t); … … 150 175 extern void async_set_client_data_destructor(async_client_data_dtor_t); 151 176 extern void *async_get_client_data(void); 152 extern void *async_get_client_data_by_id(task_id_t);153 extern void async_put_client_data_by_id(task_id_t);154 177 155 178 extern void async_set_client_connection(async_client_conn_t); 156 extern void async_set_interrupt_received(async_ interrupt_handler_t);179 extern void async_set_interrupt_received(async_client_conn_t); 157 180 158 181 /* … … 328 351 329 352 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t, 330 async_client_conn_t , void *);353 async_client_conn_t); 331 354 332 355 extern int async_hangup(async_sess_t *); … … 335 358 extern async_exch_t *async_exchange_begin(async_sess_t *); 336 359 extern void async_exchange_end(async_exch_t *); 337 338 /*339 * FIXME These functions just work around problems with parallel exchange340 * management. Proper solution needs to be implemented.341 */342 void async_sess_args_set(async_sess_t *sess, sysarg_t, sysarg_t, sysarg_t);343 360 344 361 /* … … 449 466 extern async_sess_t *async_callback_receive_start(exch_mgmt_t, ipc_call_t *); 450 467 451 extern int async_state_change_start(async_exch_t *, sysarg_t, sysarg_t,452 sysarg_t, async_exch_t *);453 extern bool async_state_change_receive(ipc_callid_t *, sysarg_t *, sysarg_t *,454 sysarg_t *);455 extern int async_state_change_finalize(ipc_callid_t, async_exch_t *);456 457 extern void *async_remote_state_acquire(async_sess_t *);458 extern void async_remote_state_update(async_sess_t *, void *);459 extern void async_remote_state_release(async_sess_t *);460 extern void async_remote_state_release_exchange(async_exch_t *);461 462 468 #endif 463 469
Note:
See TracChangeset
for help on using the changeset viewer.