# define _AC(num, suf) num
#else
# define _AC(num, suf) __tok(num, suf)
+/** @cond */
# define __tok(a, b) (a ## b)
+/** @endcond */
#endif
+/** Express @p num in Kilobytes. */
#define KB(num) (_AC(num, ULL) << 10)
+
+/** Express @p num in Megabytes. */
#define MB(num) (_AC(num, ULL) << 20)
+
+/** Express @p num in Gigabytes. */
#define GB(num) (_AC(num, ULL) << 30)
+
+/** Express @p num in Terabytes. */
#define TB(num) (_AC(num, ULL) << 40)
+/**
+ * Return a boolean indicating whether @p val is aligned on @p align. @p
+ * align is required to be exact power of two.
+ */
+#define IS_ALIGNED(val, align) (((val) & ((align) - 1)) == 0)
+
+#ifndef __ASSEMBLY__
+
+/**
+ * Express an abitrary integer @p v as void *.
+ */
#define _p(v) ((void*)(unsigned long)(v))
+#endif /* !__ASSEMBLY__ */
#endif /* XTF_NUMBERS_H */
/*