Ignore:
Timestamp:
2018-09-07T15:52:40Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3306d04
Parents:
e9d2905
Message:

Convert atomic_t to atomic_size_t (3): Use atomic_load instead of atomic_get

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/smp/sun4v/smp.c

    re9d2905 r036e97c  
    9292
    9393        /* 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));
    9696        if (to_steal < 0) {
    9797                return true;
     
    104104        for (k = 0; k < exec_unit->strand_count; k++) {
    105105                exec_units->cpus[k]->arch.proposed_nrdy =
    106                     atomic_get(&(exec_unit->cpus[k]->nrdy));
     106                    atomic_load(&(exec_unit->cpus[k]->nrdy));
    107107        }
    108108
     
    338338
    339339                        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)));
    341341                        cpus[cur_cpu].arch.id = exec_units[cur_core].cpuids[cur_core_strand];
    342342                        exec_units[cur_core].cpus[cur_core_strand] = &(cpus[cur_cpu]);
Note: See TracChangeset for help on using the changeset viewer.