gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/include/stdatomic.h
1 #ifndef __SDCC_STDATOMIC_H
2 #define __SDCC_STDATOMIC_H 1
3
4 #include <types.h>
5
6 typedef struct {unsigned char flag;} atomic_flag;
7
8 #if defined(__SDCC_z80) || defined(__SDCC_z180) || defined(__SDCC_ez80_z80) || defined(__SDCC_sm83) || defined(__SDCC_r2k) || defined(__SDCC_r3ka) || defined(__SDCC_stm8) || defined(__SDCC_hc08) || defined(__SDCC_s08) || defined(__SDCC_mos6502)
9 #define ATOMIC_FLAG_INIT {1}
10 //#elif defined(__SDCC_mcs51)
11 //#define ATOMIC_FLAG_INIT {0}
12 #else
13 #error Support for atomic_flag not implemented
14 #endif
15
16 _Bool atomic_flag_test_and_set(volatile atomic_flag *object) OLDCALL;
17
18 void atomic_flag_clear(volatile atomic_flag *object);
19
20 #endif
21
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.