Changes in kernel/arch/sparc64/src/smp/sun4v/smp.c [7c3fb9b:e3306d04] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/smp/sun4v/smp.c
r7c3fb9b re3306d04 92 92 93 93 /* calculate the number of threads the core will steal */ 94 int avg = atomic_ get(&nrdy) / exec_unit_count;95 int to_steal = avg - atomic_ get(&(exec_units->nrdy));94 int avg = atomic_load(&nrdy) / exec_unit_count; 95 int to_steal = avg - atomic_load(&(exec_units->nrdy)); 96 96 if (to_steal < 0) { 97 97 return true; … … 104 104 for (k = 0; k < exec_unit->strand_count; k++) { 105 105 exec_units->cpus[k]->arch.proposed_nrdy = 106 atomic_ get(&(exec_unit->cpus[k]->nrdy));106 atomic_load(&(exec_unit->cpus[k]->nrdy)); 107 107 } 108 108 … … 230 230 exec_units[i].exec_unit_id = exec_unit_id; 231 231 exec_units[i].strand_count = 0; 232 atomic_s et(&(exec_units[i].nrdy), 0);232 atomic_store(&(exec_units[i].nrdy), 0); 233 233 spinlock_initialize(&(exec_units[i].proposed_nrdy_lock), "exec_units[].proposed_nrdy_lock"); 234 234 exec_unit_count++; … … 270 270 exec_units[0].exec_unit_id = 1; 271 271 spinlock_initialize(&(exec_units[0].proposed_nrdy_lock), "exec_units[0].proposed_nrdy_lock"); 272 atomic_s et(&(exec_units[0].nrdy), 0);272 atomic_store(&(exec_units[0].nrdy), 0); 273 273 max_core_strands = cpu_count; 274 274 … … 338 338 339 339 cpus[cur_cpu].arch.exec_unit = &(exec_units[cur_core]); 340 atomic_add(&(exec_units[cur_core].nrdy), atomic_ get(&(cpus[cur_cpu].nrdy)));340 atomic_add(&(exec_units[cur_core].nrdy), atomic_load(&(cpus[cur_cpu].nrdy))); 341 341 cpus[cur_cpu].arch.id = exec_units[cur_core].cpuids[cur_core_strand]; 342 342 exec_units[cur_core].cpus[cur_core_strand] = &(cpus[cur_cpu]);
Note:
See TracChangeset
for help on using the changeset viewer.