vdr-plugin-softhddevice-drm-gles 1.4.0
iatomic.h
Go to the documentation of this file.
1
19#ifndef __IATOMIC_H
20#define __IATOMIC_H
21
22typedef volatile int atomic_t;
23
27#define atomic_set(ptr, val) \
28 __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)
29
33#define atomic_read(ptr) \
34 __atomic_load_n(ptr, __ATOMIC_SEQ_CST)
35
39#define atomic_inc(ptr) \
40 __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)
41
45#define atomic_dec(ptr) \
46 __atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)
47
51#define atomic_add(val, ptr) \
52 __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)
53
57#define atomic_sub(val, ptr) \
58 __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)
59
60#endif
volatile int atomic_t
atomic type, 24 bit useable
Definition: iatomic.h:22