Changeset 9bde0d5 in mainline for uspace/lib/c/generic/async/ports.c
- Timestamp:
- 2018-07-18T19:56:43Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42f5860
- Parents:
- 40abf56
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:47:28)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:56:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/ports.c
r40abf56 r9bde0d5 99 99 100 100 /** Futex guarding the interface hash table. */ 101 static futex_t interface_futex = FUTEX_INITIALIZER;101 static FIBRIL_RMUTEX_INITIALIZE(interface_mutex); 102 102 static hash_table_t interface_hash_table; 103 103 … … 205 205 interface_t *interface; 206 206 207 f utex_lock(&interface_futex);207 fibril_rmutex_lock(&interface_mutex); 208 208 209 209 ht_link_t *link = hash_table_find(&interface_hash_table, &iface); … … 214 214 215 215 if (!interface) { 216 f utex_unlock(&interface_futex);216 fibril_rmutex_unlock(&interface_mutex); 217 217 return ENOMEM; 218 218 } … … 220 220 port_t *port = async_new_port(interface, handler, data); 221 221 if (!port) { 222 f utex_unlock(&interface_futex);222 fibril_rmutex_unlock(&interface_mutex); 223 223 return ENOMEM; 224 224 } … … 226 226 *port_id = port->id; 227 227 228 f utex_unlock(&interface_futex);228 fibril_rmutex_unlock(&interface_mutex); 229 229 230 230 return EOK; … … 252 252 port_t *port = NULL; 253 253 254 f utex_lock(&interface_futex);254 fibril_rmutex_lock(&interface_mutex); 255 255 256 256 ht_link_t *link = hash_table_find(&interface_hash_table, &iface); … … 264 264 } 265 265 266 f utex_unlock(&interface_futex);266 fibril_rmutex_unlock(&interface_mutex); 267 267 268 268 return port;
Note:
See TracChangeset
for help on using the changeset viewer.