34 #ifndef _UTIL_ATOMIC_H_ 35 #define _UTIL_ATOMIC_H_ 1 40 #if !defined(__DOXYGEN__) 42 static __inline__
uint8_t __iSeiRetVal(
void)
48 static __inline__
uint8_t __iCliRetVal(
void)
54 static __inline__
void __iSeiParam(
const uint8_t *__s)
57 __asm__
volatile (
"" :::
"memory");
61 static __inline__
void __iCliParam(
const uint8_t *__s)
64 __asm__
volatile (
"" :::
"memory");
68 static __inline__
void __iRestore(
const uint8_t *__s)
71 __asm__
volatile (
"" :::
"memory");
202 #if defined(__DOXYGEN__) 203 #define ATOMIC_BLOCK(type) 205 #define ATOMIC_BLOCK(type) for ( type, __ToDo = __iCliRetVal(); \ 206 __ToDo ; __ToDo = 0 ) 223 #if defined(__DOXYGEN__) 224 #define NONATOMIC_BLOCK(type) 226 #define NONATOMIC_BLOCK(type) for ( type, __ToDo = __iSeiRetVal(); \ 227 __ToDo ; __ToDo = 0 ) 241 #if defined(__DOXYGEN__) 242 #define ATOMIC_RESTORESTATE 244 #define ATOMIC_RESTORESTATE uint8_t sreg_save \ 245 __attribute__((__cleanup__(__iRestore))) = SREG 263 #if defined(__DOXYGEN__) 264 #define ATOMIC_FORCEON 266 #define ATOMIC_FORCEON uint8_t sreg_save \ 267 __attribute__((__cleanup__(__iSeiParam))) = 0 281 #if defined(__DOXYGEN__) 282 #define NONATOMIC_RESTORESTATE 284 #define NONATOMIC_RESTORESTATE uint8_t sreg_save \ 285 __attribute__((__cleanup__(__iRestore))) = SREG 303 #if defined(__DOXYGEN__) 304 #define NONATOMIC_FORCEOFF 306 #define NONATOMIC_FORCEOFF uint8_t sreg_save \ 307 __attribute__((__cleanup__(__iCliParam))) = 0 #define sei()
Definition: interrupt.h:79
#define cli()
Definition: interrupt.h:97
unsigned char uint8_t
Definition: stdint.h:83