From 3d7ae10a541629727844163f7d64507baedd6c78 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 22 Jun 2020 20:20:08 +0200 Subject: Add a shared timer, remove timerfd usage from idle and announce --- utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils.h') diff --git a/utils.h b/utils.h index ff29d6c..c36a36c 100644 --- a/utils.h +++ b/utils.h @@ -160,6 +160,10 @@ static inline bool list_empty(struct list_head *list) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define container_of(ptr, type, member) ({ \ -- cgit v1.2.3