Changeset fc10e1b in mainline for kernel/generic/src/console/console.c


Ignore:
Timestamp:
2018-09-07T16:34:11Z (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:
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/console/console.c

    r508b0df1 rfc10e1b  
    5353#include <errno.h>
    5454#include <str.h>
     55#include <stdatomic.h>
    5556#include <abi/kio.h>
    5657#include <mm/frame.h> /* SIZE2FRAMES */
     
    6465
    6566/** Kernel log initialized */
    66 static atomic_t kio_inited = { false };
     67static atomic_bool kio_inited = false;
    6768
    6869/** First kernel log characters */
     
    202203
    203204        event_set_unmask_callback(EVENT_KIO, kio_update);
    204         atomic_set(&kio_inited, true);
     205        atomic_store(&kio_inited, true);
    205206}
    206207
     
    292293void kio_update(void *event)
    293294{
    294         if (!atomic_get(&kio_inited))
     295        if (!atomic_load(&kio_inited))
    295296                return;
    296297
Note: See TracChangeset for help on using the changeset viewer.