Home
last modified time | relevance | path

Searched refs:IS_POWER_OF_TWO (Results 1 – 5 of 5) sorted by relevance

/Zephyr-latest/tests/unit/pot/
Dis_power_of_two.c14 zassert_false(IS_POWER_OF_TWO(-1)); in ZTEST()
15 zassert_false(IS_POWER_OF_TWO(0)); in ZTEST()
16 zassert_true(IS_POWER_OF_TWO(1)); in ZTEST()
17 zassert_true(IS_POWER_OF_TWO(2)); in ZTEST()
18 zassert_false(IS_POWER_OF_TWO(3)); in ZTEST()
19 zassert_true(IS_POWER_OF_TWO(4)); in ZTEST()
20 zassert_true(IS_POWER_OF_TWO(BIT(30))); in ZTEST()
21 zassert_false(IS_POWER_OF_TWO(BIT(30) + 1)); in ZTEST()
22 zassert_true(IS_POWER_OF_TWO(BIT64(32))); in ZTEST()
23 zassert_false(IS_POWER_OF_TWO(BIT64(32) + 1)); in ZTEST()
[all …]
/Zephyr-latest/include/zephyr/sys/
Dutil_macro.h77 #define IS_POWER_OF_TWO(x) (((x) != 0U) && (((x) & ((x) - 1U)) == 0U)) macro
Dspsc_lockfree.h115 BUILD_ASSERT(IS_POWER_OF_TWO(sz)); \
Dutil.h441 return IS_POWER_OF_TWO(x); in is_power_of_two()
/Zephyr-latest/subsys/ipc/ipc_service/backends/
Dipc_icbmsg.c1441 BUILD_ASSERT(IS_POWER_OF_TWO(GET_CACHE_ALIGNMENT(i)), \