aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-05-19 00:43:40 +0200
committerMarvin Borner2021-05-19 00:43:40 +0200
commit98df498e8e8a07e33cc77a059876b940cb9b3c6a (patch)
tree57a2ff0fab411c91fba5512827c18124b092aa5d /libs/libc/inc
parent45bfdffcb2e00fda595b3f9318469f6b0d29cbe4 (diff)
Smashed some bugs
Diffstat (limited to 'libs/libc/inc')
-rw-r--r--libs/libc/inc/def.h3
1 files changed, 3 insertions, 0 deletions
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
*/