Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Macros
util.h File Reference
#include <stdint.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CEILING(x, y)   (((x) + (y) -1) / (y))
 
#define BITMAP_SIZE(x)   CEILING(x, 32) /* Bitmap type should be uint32_t */
 
#define ALIGN_MASK(x, mask)   ((x) & ~(mask))
 
#define ALIGN(x, a)   ALIGN_MASK(x, (__typeof__(x)) ((a) -1))