Changeset a6e55886 in mainline for kernel/generic/src/synch/rcu.c
- Timestamp:
- 2018-11-01T14:30:03Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d1da1ff2
- Parents:
- bab75df6
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-01 14:30:03)
- git-committer:
- GitHub <noreply@…> (2018-11-01 14:30:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/rcu.c
rbab75df6 ra6e55886 1026 1026 cpu_mask_t *reader_cpus = (cpu_mask_t *)arg; 1027 1027 1028 bool locked = RCU_CNT_INC <= THE->rcu_nesting;1028 bool locked = RCU_CNT_INC <= CURRENT->rcu_nesting; 1029 1029 /* smp_call machinery makes the most current _rcu_cur_gp visible. */ 1030 1030 bool passed_qs = (CPU->rcu.last_seen_gp == _rcu_cur_gp); … … 1054 1054 * with a local copy. 1055 1055 */ 1056 size_t nesting_cnt = local_atomic_exchange(& THE->rcu_nesting, 0);1056 size_t nesting_cnt = local_atomic_exchange(&CURRENT->rcu_nesting, 0); 1057 1057 1058 1058 /* … … 1113 1113 1114 1114 /* Load the thread's saved nesting count from before it was preempted. */ 1115 THE->rcu_nesting = THREAD->rcu.nesting_cnt;1115 CURRENT->rcu_nesting = THREAD->rcu.nesting_cnt; 1116 1116 } 1117 1117 … … 1123 1123 void rcu_thread_exiting(void) 1124 1124 { 1125 assert( THE->rcu_nesting == 0);1125 assert(CURRENT->rcu_nesting == 0); 1126 1126 1127 1127 /* … … 1145 1145 bool rcu_read_locked(void) 1146 1146 { 1147 return RCU_CNT_INC <= THE->rcu_nesting;1147 return RCU_CNT_INC <= CURRENT->rcu_nesting; 1148 1148 } 1149 1149 … … 1151 1151 void _rcu_preempted_unlock(void) 1152 1152 { 1153 assert(0 == THE->rcu_nesting || RCU_WAS_PREEMPTED == THE->rcu_nesting);1154 1155 size_t prev = local_atomic_exchange(& THE->rcu_nesting, 0);1153 assert(0 == CURRENT->rcu_nesting || RCU_WAS_PREEMPTED == CURRENT->rcu_nesting); 1154 1155 size_t prev = local_atomic_exchange(&CURRENT->rcu_nesting, 0); 1156 1156 if (prev == RCU_WAS_PREEMPTED) { 1157 1157 /*
Note:
See TracChangeset
for help on using the changeset viewer.