Changeset 036e97c in mainline for kernel/test/synch


Ignore:
Timestamp:
2018-09-07T15:52:40Z (7 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

Location:
kernel/test/synch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/synch/rcu1.c

    re9d2905 r036e97c  
    282282        size_t loop_cnt = 0, max_loops = 15;
    283283
    284         while (exp_cnt != atomic_get(&nop_callbacks_cnt) && loop_cnt < max_loops) {
     284        while (exp_cnt != atomic_load(&nop_callbacks_cnt) && loop_cnt < max_loops) {
    285285                ++loop_cnt;
    286286                TPRINTF(".");
     
    840840        rcu_barrier();
    841841
    842         if (1 == atomic_get(&barrier->done)) {
     842        if (1 == atomic_load(&barrier->done)) {
    843843                free(barrier);
    844844                return true;
  • kernel/test/synch/workq-test-core.h

    re9d2905 r036e97c  
    179179
    180180        for (int i = 0; i < WAVES; ++i) {
    181                 while (atomic_get(&call_cnt[i]) < exp_call_cnt &&
     181                while (atomic_load(&call_cnt[i]) < exp_call_cnt &&
    182182                    sleep_cnt < max_sleep_cnt) {
    183183                        TPRINTF(".");
     
    190190
    191191        for (int i = 0; i < WAVES; ++i) {
    192                 if (atomic_get(&call_cnt[i]) == exp_call_cnt) {
     192                if (atomic_load(&call_cnt[i]) == exp_call_cnt) {
    193193                        TPRINTF("Ok: %zu calls in wave %d, as expected.\n",
    194                             atomic_get(&call_cnt[i]), i);
     194                            atomic_load(&call_cnt[i]), i);
    195195                } else {
    196196                        success = false;
    197197                        TPRINTF("Error: %zu calls in wave %d, but %zu expected.\n",
    198                             atomic_get(&call_cnt[i]), i, exp_call_cnt);
     198                            atomic_load(&call_cnt[i]), i, exp_call_cnt);
    199199                }
    200200        }
Note: See TracChangeset for help on using the changeset viewer.