![]() |
EVE 1.0
|
![]() |
Macros | |
#define | TRUE true |
#define | FALSE false |
#define | ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) |
#define | container_of(ptr, type, mem) ((type*) (((char*)(ptr)) - offsetof(type, mem))) |
#define ARRAY_SIZE | ( | arr | ) | (sizeof(arr) / sizeof((arr)[0])) |
#define container_of | ( | ptr, | |
type, | |||
mem | |||
) | ((type*) (((char*)(ptr)) - offsetof(type, mem))) |
Converts pointer to a member of a structure to the pointer to the structure.
Usage:
ptr | pointer to the member of the structure |
type | type name of the structure |
mem | name of the memeber of the structure |