Changes in uspace/lib/c/generic/async.c [cff3fb6:36e2b55] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
rcff3fb6 r36e2b55 118 118 #define CONN_HASH_TABLE_BUCKETS 32 119 119 120 /** Session data */121 struct async_sess {122 /** List of inactive exchanges */123 list_t exch_list;124 125 /** Exchange management style */126 exch_mgmt_t mgmt;127 128 /** Session identification */129 int phone;130 131 /** First clone connection argument */132 sysarg_t arg1;133 134 /** Second clone connection argument */135 sysarg_t arg2;136 137 /** Third clone connection argument */138 sysarg_t arg3;139 140 /** Exchange mutex */141 fibril_mutex_t mutex;142 143 /** Number of opened exchanges */144 atomic_t refcnt;145 146 /** Mutex for stateful connections */147 fibril_mutex_t remote_state_mtx;148 149 /** Data for stateful connections */150 void *remote_state_data;151 };152 153 /** Exchange data */154 struct async_exch {155 /** Link into list of inactive exchanges */156 link_t sess_link;157 158 /** Link into global list of inactive exchanges */159 link_t global_link;160 161 /** Session pointer */162 async_sess_t *sess;163 164 /** Exchange identification */165 int phone;166 };167 168 120 /** Async framework global futex */ 169 121 atomic_t async_futex = FUTEX_INITIALIZER; … … 182 134 ipc_call_t call; 183 135 } msg_t; 184 185 /** Message data */186 typedef struct {187 awaiter_t wdata;188 189 /** If reply was received. */190 bool done;191 192 /** Pointer to where the answer data is stored. */193 ipc_call_t *dataptr;194 195 sysarg_t retval;196 } amsg_t;197 136 198 137 /* Client connection data */ … … 1846 1785 1847 1786 fibril_mutex_lock(&async_sess_mutex); 1848 1787 1849 1788 int rc = async_hangup_internal(sess->phone); 1789 if (rc == EOK) 1790 free(sess); 1850 1791 1851 1792 while (!list_empty(&sess->exch_list)) { … … 1859 1800 free(exch); 1860 1801 } 1861 1862 free(sess);1863 1802 1864 1803 fibril_mutex_unlock(&async_sess_mutex);
Note:
See TracChangeset
for help on using the changeset viewer.