Changeset fc10e1b in mainline for kernel/test/synch/workq-test-core.h


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/test/synch/workq-test-core.h

    r508b0df1 rfc10e1b  
    149149{
    150150        for (int i = 0; i < WAVES; ++i) {
    151                 atomic_set(&call_cnt[i], 0);
     151                atomic_store(&call_cnt[i], 0);
    152152        }
    153153
     
    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) {
    193                         TPRINTF("Ok: %" PRIua " calls in wave %d, as expected.\n",
    194                             atomic_get(&call_cnt[i]), i);
     192                if (atomic_load(&call_cnt[i]) == exp_call_cnt) {
     193                        TPRINTF("Ok: %zu calls in wave %d, as expected.\n",
     194                            atomic_load(&call_cnt[i]), i);
    195195                } else {
    196196                        success = false;
    197                         TPRINTF("Error: %" PRIua " calls in wave %d, but %zu expected.\n",
    198                             atomic_get(&call_cnt[i]), i, exp_call_cnt);
     197                        TPRINTF("Error: %zu calls in wave %d, but %zu expected.\n",
     198                            atomic_load(&call_cnt[i]), i, exp_call_cnt);
    199199                }
    200200        }
Note: See TracChangeset for help on using the changeset viewer.