diff options
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 337aee814d..fa6f78b52f 100644 --- a/internal.h +++ b/internal.h @@ -30,6 +30,8 @@ #include "internal/sanitizers.h" #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0]))) +#define roomof(x, y) (((x) + (y) - 1) / (y)) +#define type_roomof(x, y) roomof(sizeof(x), sizeof(y)) /* Prevent compiler from reordering access */ #define ACCESS_ONCE(type,x) (*((volatile type *)&(x))) |