Go to the source code of this file.
◆ __unused
#define __unused __attribute__((unused)) |
◆ alloca
#define alloca |
( |
|
x | ) |
__builtin_alloca(x) |
◆ container_of
#define container_of |
( |
|
ptr, |
|
|
|
type, |
|
|
|
member |
|
) |
| |
Value: ({ \
const __typeof__(((
type *)0)->member) *__mptr = (ptr); \
#define offsetof(TYPE, MEMBER)
container_of - cast a member of a structure out to the containing structure
- Parameters
-
ptr | the pointer to the member. |
type | the type of the container struct this is embedded in. |
member | the name of the member within the struct. |
Definition at line 33 of file helpers.h.
◆ DIV_ROUND_CLOSEST
#define DIV_ROUND_CLOSEST |
( |
|
x, |
|
|
|
divisor |
|
) |
| |
Value: ({ \
__typeof__(
x) _div_local_x = (
x); \
__typeof__(divisor) _div_local_d = (divisor); \
(((__typeof__(
x))-1) > 0 || \
((__typeof__(divisor))-1) > 0 || (_div_local_x) > 0) ? \
((_div_local_x + (_div_local_d / 2)) / _div_local_d) : \
((_div_local_x - (_div_local_d / 2)) / _div_local_d); \
})
Definition at line 17 of file helpers.h.