Changeset 514d561 in mainline for uspace/lib/c/generic/rcu.c
- Timestamp:
- 2018-07-20T16:27:20Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05208d9
- Parents:
- 7137f74c
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-19 21:52:47)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-20 16:27:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rcu.c
r7137f74c r514d561 115 115 116 116 typedef struct blocked_fibril { 117 fi d_t id;117 fibril_event_t unblock; 118 118 link_t link; 119 119 bool is_ready; … … 218 218 } 219 219 220 /** Delimits the startof an RCU reader critical section. */220 /** Delimits the end of an RCU reader critical section. */ 221 221 void rcu_read_unlock(void) 222 222 { … … 361 361 if (rcu.sync_lock.locked) { 362 362 blocked_fibril_t blocked_fib; 363 blocked_fib. id = fibril_get_id();363 blocked_fib.unblock = FIBRIL_EVENT_INIT; 364 364 365 365 list_append(&blocked_fib.link, &rcu.sync_lock.blocked_fibrils); … … 368 368 blocked_fib.is_ready = false; 369 369 fibril_rmutex_unlock(&rcu.sync_lock.mutex); 370 futex_lock(&async_futex); 371 fibril_switch(FIBRIL_FROM_BLOCKED); 372 futex_unlock(&async_futex); 370 fibril_wait_for(&blocked_fib.unblock); 373 371 fibril_rmutex_lock(&rcu.sync_lock.mutex); 374 372 } while (rcu.sync_lock.locked); … … 393 391 if (!blocked_fib->is_ready) { 394 392 blocked_fib->is_ready = true; 395 fibril_ add_ready(blocked_fib->id);393 fibril_notify(&blocked_fib->unblock); 396 394 } 397 395 }
Note:
See TracChangeset
for help on using the changeset viewer.