From f2300b433e152968a0fcabd79fb9d0f5fda6bca3 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 23 Dec 2021 18:23:50 +0200 Subject: Added alloc_fixed_region + Not used at the moment anywhere, but should come in handy when emulating stuff like (s)brk and when mapping ELF stuff --- include/apos/utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/apos/utils.h b/include/apos/utils.h index b973d49..f1e79fa 100644 --- a/include/apos/utils.h +++ b/include/apos/utils.h @@ -1,6 +1,8 @@ #ifndef APOS_UTILS_H #define APOS_UTILS_H +#define ABS(a) (a < 0 ? -a : a) + #define MAX(a, b) ((a) >= (b) ? (a) : (b)) #define MAX3(a, b, c) (MAX(a, b) >= MAX(b, c) ? MAX(a, b) : MAX(b, c)) #define MAX4(a, b, c, d) (MAX3(a, b, c) >= MAX3(b, c, d) ? MAX3(a, b, c) : MAX3(b, c, d)) -- cgit v1.3