diff --git a/sys/sys/param.h b/sys/sys/param.h index 7772c17dff3c..63f520e6c2c7 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -362,4 +362,8 @@ __END_DECLS */ #define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset]) +/* Unit conversion macros. */ +#define GiB(v) (v ## ULL << 30) +#define MiB(v) (v ## ULL << 20) + #endif /* _SYS_PARAM_H_ */