Sturk 1.0.2
Publish-subscribe C implementation.
|
Basic arithmetic operations. More...
#include <stddef.h>
Go to the source code of this file.
Macros | |
#define | ST_MAX(x, y) (((x) > (y)) ? (x) : (y)) |
Compute the maximum of two values. | |
#define | ST_MIN(x, y) (((x) < (y)) ? (x) : (y)) |
Compute the minimum of two values. | |
#define | st_container_of(ptr, type, member) |
Cast a member of a structure out to the containing structure. | |
Basic arithmetic operations.
#define st_container_of | ( | ptr, | |
type, | |||
member | |||
) |
Cast a member of a structure out to the containing structure.
[in] | ptr | The pointer to the member. |
[in] | type | The type of the container struct this is embedded in. |
[in] | member | The name of the member within the struct. |
#define ST_MAX | ( | x, | |
y | |||
) | (((x) > (y)) ? (x) : (y)) |
Compute the maximum of two values.
This macro returns the maximum of x and y.
#define ST_MIN | ( | x, | |
y | |||
) | (((x) < (y)) ? (x) : (y)) |
Compute the minimum of two values.
This macro returns the minimum of x and y.