Changeset aaa3c457 in mainline for uspace/lib/c/generic/async
- Timestamp:
- 2018-11-12T10:36:10Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a43dfcb
- Parents:
- 3ce781f4 (diff), 6874bd2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-11-12 10:36:10)
- git-committer:
- GitHub <noreply@…> (2018-11-12 10:36:10)
- Location:
- uspace/lib/c/generic/async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
r3ce781f4 raaa3c457 122 122 #include "../private/fibril.h" 123 123 124 static FIBRIL_RMUTEX_INITIALIZE(message_mutex);124 static fibril_rmutex_t message_mutex; 125 125 126 126 /** Naming service session */ … … 173 173 void __async_client_init(void) 174 174 { 175 if (fibril_rmutex_initialize(&message_mutex) != EOK) 176 abort(); 177 175 178 session_ns.iface = 0; 176 179 session_ns.mgmt = EXCHANGE_ATOMIC; … … 186 189 fibril_mutex_initialize(&session_ns.mutex); 187 190 session_ns.exchanges = 0; 191 } 192 193 void __async_client_fini(void) 194 { 195 fibril_rmutex_destroy(&message_mutex); 188 196 } 189 197 -
uspace/lib/c/generic/async/ports.c
r3ce781f4 raaa3c457 100 100 101 101 /** Futex guarding the interface hash table. */ 102 static FIBRIL_RMUTEX_INITIALIZE(interface_mutex);102 static fibril_rmutex_t interface_mutex; 103 103 static hash_table_t interface_hash_table; 104 104 … … 292 292 void __async_ports_init(void) 293 293 { 294 if (fibril_rmutex_initialize(&interface_mutex) != EOK) 295 abort(); 296 294 297 if (!hash_table_create(&interface_hash_table, 0, 0, 295 298 &interface_hash_table_ops)) 296 299 abort(); 297 300 } 301 302 void __async_ports_fini(void) 303 { 304 fibril_rmutex_destroy(&interface_mutex); 305 } -
uspace/lib/c/generic/async/server.c
r3ce781f4 raaa3c457 216 216 } 217 217 218 static FIBRIL_RMUTEX_INITIALIZE(client_mutex);218 static fibril_rmutex_t client_mutex; 219 219 static hash_table_t client_hash_table; 220 220 221 221 // TODO: lockfree notification_queue? 222 static FIBRIL_RMUTEX_INITIALIZE(notification_mutex);222 static fibril_rmutex_t notification_mutex; 223 223 static hash_table_t notification_hash_table; 224 224 static LIST_INITIALIZE(notification_queue); … … 1013 1013 void __async_server_init(void) 1014 1014 { 1015 if (fibril_rmutex_initialize(&client_mutex) != EOK) 1016 abort(); 1017 if (fibril_rmutex_initialize(¬ification_mutex) != EOK) 1018 abort(); 1019 1015 1020 if (!hash_table_create(&client_hash_table, 0, 0, &client_hash_table_ops)) 1016 1021 abort(); … … 1021 1026 1022 1027 async_create_manager(); 1028 } 1029 1030 void __async_server_fini(void) 1031 { 1032 fibril_rmutex_destroy(&client_mutex); 1033 fibril_rmutex_destroy(¬ification_mutex); 1023 1034 } 1024 1035
Note:
See TracChangeset
for help on using the changeset viewer.
