Changeset fc10e1b in mainline for kernel/generic/src/lib/halt.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/lib/halt.c

    r508b0df1 rfc10e1b  
    4444
    4545/** Halt flag */
    46 atomic_t haltstate = { 0 };
     46atomic_t haltstate = 0;
    4747
    4848/** Halt wrapper
     
    5656        bool rundebugger = false;
    5757
    58         if (!atomic_get(&haltstate)) {
    59                 atomic_set(&haltstate, 1);
     58        if (!atomic_load(&haltstate)) {
     59                atomic_store(&haltstate, 1);
    6060                rundebugger = true;
    6161        }
    6262#else
    63         atomic_set(&haltstate, 1);
     63        atomic_store(&haltstate, 1);
    6464#endif
    6565
Note: See TracChangeset for help on using the changeset viewer.