GBDK 2020 Docs API Documentation for GBDK 2020

stdatomic.h
Go to the documentation of this file.
1 #ifndef __SDCC_STDATOMIC_H
2 #define __SDCC_STDATOMIC_H 1
3
4 typedef struct {unsigned char flag;} atomic_flag;
5
6 #if defined(__SDCC_z80) || defined(__SDCC_z180) || defined(__SDCC_ez80_z80) || defined(__SDCC_gbz80) || defined(__SDCC_r2k) || defined(__SDCC_r3ka) || defined(__SDCC_stm8) || defined(__SDCC_hc08) || defined(__SDCC_s08)
7 #define ATOMIC_FLAG_INIT {1}
8 //#elif defined(__SDCC_mcs51)
9 //#define ATOMIC_FLAG_INIT {0}
10 #else
11 #error Support for atomic_flag not implemented
12 #endif
13
14 _Bool atomic_flag_test_and_set(volatile atomic_flag *object);
15
16 void atomic_flag_clear(volatile atomic_flag *object);
17
18 #endif
19
atomic_flag
Definition: stdatomic.h:4
atomic_flag_test_and_set
_Bool atomic_flag_test_and_set(volatile atomic_flag *object)
atomic_flag::flag
unsigned char flag
Definition: stdatomic.h:4
atomic_flag_clear
void atomic_flag_clear(volatile atomic_flag *object)