kernel_defines.h File Reference

Common macros and compiler attributes/pragmas configuration. More...

Detailed Description

#include <stddef.h>
+ Include dependency graph for kernel_defines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define container_of(PTR, TYPE, MEMBER)   ((TYPE *) ((char *) (PTR) - offsetof(TYPE, MEMBER)))
 Returns the container of a pointer to a member. More...
 
#define NORETURN
 The NORETURN keyword tells the compiler to assume that the function cannot return.
 
#define CONST
 A function declared as CONST is PURE and also not allowed to examine global memory. More...
 
#define PURE
 The function has no effects except the return value and its return value depends only on the parameters and/or global variables. More...
 
#define UNREACHABLE()   do { /* nothing */ } while (1)
 Tell the compiler that this line of code cannot be reached. More...
 
#define ALIGN_OF(T)   (offsetof(struct { char c; T t; }, t))
 Calculate the minimal alignment for type T. More...