Changeset fc10e1b in mainline for kernel/generic/src/synch/rcu.c


Ignore:
Timestamp:
2018-09-07T16:34:11Z (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:
d2c91ab
Parents:
508b0df1 (diff), e90cfa6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'atomic'

Use more of <stdatomic.h> in kernel. Increment/decrement macros kept because
the are handy. atomic_t currently kept because I'm way too lazy to go through
all uses and think about the most appropriate replacement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/rcu.c

    r508b0df1 rfc10e1b  
    312312
    313313        mutex_initialize(&rcu.barrier_mtx, MUTEX_PASSIVE);
    314         atomic_set(&rcu.barrier_wait_cnt, 0);
     314        atomic_store(&rcu.barrier_wait_cnt, 0);
    315315        waitq_initialize(&rcu.barrier_wq);
    316316
     
    322322        rcu.req_gp_end_cnt = 0;
    323323        rcu.req_expedited_cnt = 0;
    324         atomic_set(&rcu.delaying_cpu_cnt, 0);
     324        atomic_store(&rcu.delaying_cpu_cnt, 0);
    325325#endif
    326326
     
    594594         * enqueued barrier callbacks start signaling completion.
    595595         */
    596         atomic_set(&rcu.barrier_wait_cnt, 1);
     596        atomic_store(&rcu.barrier_wait_cnt, 1);
    597597
    598598        DEFINE_CPU_MASK(cpu_mask);
     
    14121412static void interrupt_delaying_cpus(cpu_mask_t *cpu_mask)
    14131413{
    1414         atomic_set(&rcu.delaying_cpu_cnt, 0);
     1414        atomic_store(&rcu.delaying_cpu_cnt, 0);
    14151415
    14161416        sample_cpus(cpu_mask, NULL);
     
    14771477static bool wait_for_delaying_cpus(void)
    14781478{
    1479         int delaying_cpu_cnt = atomic_get(&rcu.delaying_cpu_cnt);
     1479        int delaying_cpu_cnt = atomic_load(&rcu.delaying_cpu_cnt);
    14801480
    14811481        for (int i = 0; i < delaying_cpu_cnt; ++i) {
Note: See TracChangeset for help on using the changeset viewer.