8#ifndef ZEPHYR_INCLUDE_ARCH_COMMON_FFS_H_
9#define ZEPHYR_INCLUDE_ARCH_COMMON_FFS_H_
37 return 32 - __builtin_clz(op);
55#ifdef CONFIG_TOOLCHAIN_HAS_BUILTIN_FFS
56 return __builtin_ffs(op);
69 for (bit = 0; bit < 32; bit++) {
70 if ((op & (1 << bit)) != 0) {
#define ALWAYS_INLINE
Definition: common.h:129
static ALWAYS_INLINE unsigned int find_msb_set(uint32_t op)
find most significant bit set in a 32-bit word
Definition: ffs.h:31
static ALWAYS_INLINE unsigned int find_lsb_set(uint32_t op)
find least significant bit set in a 32-bit word
Definition: ffs.h:53
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90