From 989068cf7087bf48f30c7f7c3f9acfa0bfd263ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 3 Dec 2019 14:42:53 +0900 Subject: internal/imemo.h rework Arrange contents and eliminate macros, to make them readable. Macro IFUNC_NEW was deleted because there was only one usage. --- internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal.h') 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))) -- cgit v1.2.3