NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
atomic.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ATOMIC_BLOCK(prio)
 
#define ATOMIC_BLOCK_NB(prio)
 
#define __UNIQL_CONCAT2(x, y)   x ## y
 
#define __UNIQL_CONCAT(x, y)   __UNIQL_CONCAT2(x,y)
 
#define __UNIQL(x)   __UNIQL_CONCAT(x,__LINE__)
 
#define ATOMIC_BARRIER(data)
 
#define ATOMIC_OR(ptr, val)   __sync_fetch_and_or(ptr, val)
 
#define ATOMIC_AND(ptr, val)   __sync_fetch_and_and(ptr, val)
 

Functions

 __attribute__ ((always_inline)) static inline void __set_BASEPRI_nb(uint32_t basePri)
 

Macro Definition Documentation

#define __UNIQL (   x)    __UNIQL_CONCAT(x,__LINE__)
#define __UNIQL_CONCAT (   x,
 
)    __UNIQL_CONCAT2(x,y)
#define __UNIQL_CONCAT2 (   x,
 
)    x ## y
#define ATOMIC_AND (   ptr,
  val 
)    __sync_fetch_and_and(ptr, val)
#define ATOMIC_BARRIER (   data)
Value:
__extension__ void __UNIQL(__barrierEnd)(typeof(data) **__d) { \
__asm__ volatile ("\t# barier(" #data ") end\n" : : "m" (**__d)); \
} \
typeof(data) __attribute__((__cleanup__(__UNIQL(__barrierEnd)))) *__UNIQL(__barrier) = &data; \
__asm__ volatile ("\t# barier (" #data ") start\n" : "=m" (*__UNIQL(__barrier)))
Definition: cli.c:472
#define __UNIQL(x)
Definition: atomic.h:96
uint16_t data
Definition: config.c:91
#define ATOMIC_BLOCK (   prio)
Value:
for ( uint8_t __basepri_save __attribute__((__cleanup__(__basepriRestoreMem))) = __get_BASEPRI(), \
__ToDo = __basepriSetMemRetVal(prio); __ToDo ; __ToDo = 0 )
__attribute__((always_inline)) static inline void __set_BASEPRI_nb(uint32_t basePri)
Definition: atomic.h:24
#define ATOMIC_BLOCK_NB (   prio)
Value:
for ( uint8_t __basepri_save __attribute__((__cleanup__(__basepriRestore))) = __get_BASEPRI(), \
__ToDo = __basepriSetRetVal(prio); __ToDo ; __ToDo = 0 ) \
__attribute__((always_inline)) static inline void __set_BASEPRI_nb(uint32_t basePri)
Definition: atomic.h:24
#define ATOMIC_OR (   ptr,
  val 
)    __sync_fetch_and_or(ptr, val)

Function Documentation

__attribute__ ( (always_inline)  )