summaryrefslogtreecommitdiff
path: root/lib/igt_aux.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r--lib/igt_aux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index faddd478..9bb03b77 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -390,4 +390,6 @@ static inline bool igt_list_empty(const struct igt_list *list)
__builtin_popcountll(x), \
__builtin_popcount(x))
+#define is_power_of_two(x) (((x) & ((x)-1)) == 0)
+
#endif /* IGT_AUX_H */