Changeset 91a8f83 in mainline for kernel/generic/src/synch/rcu.c
- Timestamp:
- 2018-10-31T18:15:56Z (6 years ago)
- Children:
- 071cb36
- Parents:
- 482f968
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/rcu.c
r482f968 r91a8f83 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.