* @brief This function finds the first bit set (beginning with the least significant bit) * in value and return the index of that bit. * * Bits are numbered starting at 1 (the least significant bit). A return value of * zero from any of these functions means that the argument was zero. * * @param value is the value to find the first bit set in. * * @return return the index of the first bi
| 1091 | * shall return 0. |
| 1092 | */ |
| 1093 | int __rt_ffs(int value) |
| 1094 | { |
| 1095 | return __lowest_bit_bitmap[(rt_uint32_t)(value & (value - 1) ^ value) % 37]; |
| 1096 | } |
| 1097 | #else |
| 1098 | const rt_uint8_t __lowest_bit_bitmap[] = |
| 1099 | { |
no outgoing calls
no test coverage detected