Move common macros into bionic_macros.h.

Bug: 15590152
Change-Id: I730636613ef3653f68c5ab1d43b53beaf8e0dc25
This commit is contained in:
Christopher Ferris
2014-06-13 13:57:51 -07:00
parent 64dfbd242c
commit 03eebcb6e8
8 changed files with 42 additions and 29 deletions

View File

@@ -33,4 +33,10 @@
TypeName(); \
DISALLOW_COPY_AND_ASSIGN(TypeName)
#define BIONIC_ALIGN(value, alignment) \
(((value) + (alignment) - 1) & ~((alignment) - 1))
#define BIONIC_ROUND_UP_POWER_OF_2(value) \
(1UL << (sizeof(value) * 8 - 1 - __builtin_clz(value)))
#endif // _BIONIC_MACROS_H_