From 98df498e8e8a07e33cc77a059876b940cb9b3c6a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 19 May 2021 00:43:40 +0200 Subject: Smashed some bugs --- libs/libc/inc/def.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/libc/inc/def.h') diff --git a/libs/libc/inc/def.h b/libs/libc/inc/def.h index 7338242..c9c89fd 100644 --- a/libs/libc/inc/def.h +++ b/libs/libc/inc/def.h @@ -41,6 +41,9 @@ typedef unsigned long long u64; #define __STRINGIFY(a) #a #define STRINGIFY(a) __STRINGIFY(a) +#define ALIGN_UP(addr, align) (((addr) + (align)-1) & ~((align)-1)) +#define ALIGN_DOWN(addr, align) ((addr) & ~((align)-1)) + /** * Compiler attribute wrappers */ -- cgit v1.2.3