diff --git a/include/common.h b/include/common.h index 1bea10c..35ad7b9 100644 --- a/include/common.h +++ b/include/common.h @@ -231,4 +231,14 @@ } \ ) +#define abs(x) ({ \ + long __x = (x); \ + (__x < 0) ? -__x : __x; \ + }) + +#define abs64(x) ({ \ + s64 __x = (x); \ + (__x < 0) ? -__x : __x; \ + }) + #endif /* __COMMON_H_ */