mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Macro fixes:
- Add missing "order_base_2()" macro. - Fix BUILD_BUG_ON() macro. MFC after: 1 month Sponsored by: Mellanox Technologies
This commit is contained in:
parent
735c8d9528
commit
74db12ca99
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279205
@ -59,7 +59,7 @@
|
||||
#define KERN_INFO "<6>"
|
||||
#define KERN_DEBUG "<7>"
|
||||
|
||||
#define BUILD_BUG_ON(x) CTASSERT(x)
|
||||
#define BUILD_BUG_ON(x) CTASSERT(!(x))
|
||||
|
||||
#define BUG() panic("BUG")
|
||||
#define BUG_ON(condition) do { if (condition) BUG(); } while(0)
|
||||
|
@ -167,4 +167,6 @@ int __ilog2_u64(u64 n)
|
||||
__ilog2_u64(n) \
|
||||
)
|
||||
|
||||
#define order_base_2(x) ilog2(roundup_pow_of_two(x))
|
||||
|
||||
#endif /* _LINUX_LOG2_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user