util: common: Add BIT operation 42/270842/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 10 Feb 2022 04:06:19 +0000 (13:06 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 10 Feb 2022 04:06:19 +0000 (13:06 +0900)
Change-Id: I6db6713364c702e16018bba092fbc39a344fd9d5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
include/util/common.h

index 40b75a3..263ceea 100644 (file)
@@ -93,6 +93,12 @@ typedef unsigned long long uint64;
 #ifndef USEC_TO_MSEC
 #define USEC_TO_MSEC(x)                ((double)x/1000)
 #endif
+#ifndef BIT
+#define BIT(x)                 (1ULL << x)
+#endif
+#ifndef BIT32
+#define BIT32(x)               (1UL << x)
+#endif
 
 #ifndef container_of
 #define container_of(ptr, type, member) ({                     \