runner: add round_up/round_down helpers support
@@ -51,6 +51,16 @@ struct tcmulib_cmd;
(void) (&_a == &_b); \
_a < _b ? _a : _b; })
+#define round_up(a, b) ({ \
+ __typeof__ (a) _a = (a); \
+ __typeof__ (b) _b = (b); \
+ ((_a + (_b - 1)) / _b) * _b; })
+
+#define round_down(a, b) ({ \
+ __typeof__ (a) _a = (a); \
+ __typeof__ (b) _b = (b); \
+ (_a - (_a % _b)); })
+
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define VPD_MAX_WRITE_SAME_LENGTH 0xFFFF
