Changeset 9f272d9 in mainline for uspace/lib/c/generic/async/client.c
- Timestamp:
- 2018-06-19T19:43:42Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5c76cc61
- Parents:
- 47be512
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-31 16:26:54)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-19 19:43:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
r47be512 r9f272d9 99 99 #include <async.h> 100 100 #include "../private/async.h" 101 #include "../private/ns.h" 101 102 #undef LIBC_ASYNC_C_ 102 103 … … 122 123 123 124 /** Naming service session */ 124 async_sess_t *session_ns;125 async_sess_t session_ns; 125 126 126 127 /** Message data */ … … 210 211 void __async_client_init(void) 211 212 { 212 session_ns = (async_sess_t *) malloc(sizeof(async_sess_t)); 213 if (session_ns == NULL) 214 abort(); 215 216 session_ns->iface = 0; 217 session_ns->mgmt = EXCHANGE_ATOMIC; 218 session_ns->phone = PHONE_NS; 219 session_ns->arg1 = 0; 220 session_ns->arg2 = 0; 221 session_ns->arg3 = 0; 222 223 fibril_mutex_initialize(&session_ns->remote_state_mtx); 224 session_ns->remote_state_data = NULL; 225 226 list_initialize(&session_ns->exch_list); 227 fibril_mutex_initialize(&session_ns->mutex); 228 atomic_set(&session_ns->refcnt, 0); 213 session_ns.iface = 0; 214 session_ns.mgmt = EXCHANGE_ATOMIC; 215 session_ns.phone = PHONE_NS; 216 session_ns.arg1 = 0; 217 session_ns.arg2 = 0; 218 session_ns.arg3 = 0; 219 220 fibril_mutex_initialize(&session_ns.remote_state_mtx); 221 session_ns.remote_state_data = NULL; 222 223 list_initialize(&session_ns.exch_list); 224 fibril_mutex_initialize(&session_ns.mutex); 225 atomic_set(&session_ns.refcnt, 0); 229 226 } 230 227
Note:
See TracChangeset
for help on using the changeset viewer.