Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
common.h File Reference

Common toolchain abstraction. More...

Go to the source code of this file.

Macros

#define EXTERN_C   extern
 
#define REQUIRES(sym)   __asm__ (".set " # sym "_Requires, " # sym "\n\t");
 
#define ALWAYS_INLINE   inline __attribute__((always_inline))
 
#define STRINGIFY(s)   Z_STRINGIFY(s)
 
#define STRUCT_SECTION_ITERABLE(struct_type, name)
 Defines a new iterable section. More...
 
#define STRUCT_SECTION_ITERABLE_ALTERNATE(out_type, struct_type, name)
 Defines an alternate data type iterable section. More...
 
#define STRUCT_SECTION_FOREACH(struct_type, iterator)
 Iterate over a specified iterable section. More...
 
#define LOG2CEIL(x)
 

Detailed Description

Common toolchain abstraction.

Macros to abstract compiler capabilities (common to all toolchains).

Macro Definition Documentation

◆ ALWAYS_INLINE

#define ALWAYS_INLINE   inline __attribute__((always_inline))

◆ EXTERN_C

#define EXTERN_C   extern

◆ LOG2CEIL

#define LOG2CEIL (   x)
Value:
((((x) <= 4) ? 2 : (((x) <= 8) ? 3 : (((x) <= 16) ? \
4 : (((x) <= 32) ? 5 : (((x) <= 64) ? 6 : (((x) <= 128) ? \
7 : (((x) <= 256) ? 8 : (((x) <= 512) ? 9 : (((x) <= 1024) ? \
10 : (((x) <= 2048) ? 11 : (((x) <= 4096) ? 12 : (((x) <= 8192) ? \
13 : (((x) <= 16384) ? 14 : (((x) <= 32768) ? 15:(((x) <= 65536) ? \
16 : (((x) <= 131072) ? 17 : (((x) <= 262144) ? 18:(((x) <= 524288) ? \
19 : (((x) <= 1048576) ? 20 : (((x) <= 2097152) ? \
21 : (((x) <= 4194304) ? 22 : (((x) <= 8388608) ? \
23 : (((x) <= 16777216) ? 24 : (((x) <= 33554432) ? \
25 : (((x) <= 67108864) ? 26 : (((x) <= 134217728) ? \
27 : (((x) <= 268435456) ? 28 : (((x) <= 536870912) ? \
29 : (((x) <= 1073741824) ? 30 : (((x) <= 2147483648) ? \
31 : 32)))))))))))))))))))))))))))))))

◆ REQUIRES

#define REQUIRES (   sym)    __asm__ (".set " # sym "_Requires, " # sym "\n\t");

◆ STRINGIFY

#define STRINGIFY (   s)    Z_STRINGIFY(s)