1
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
38
39
40
41
42
43
44
45
46
47
48
49
50
51
55
56
57
58
59
60
/* ... */
#ifndef _BLE_MESH_FFS_H_
#define _BLE_MESH_FFS_H_
#include "mesh/types.h"
#include "mesh/compiler.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ... */
static ALWAYS_INLINE unsigned int find_msb_set(uint32_t op)
{
if (op == 0) {
return 0;
}{...}
return 32 - __builtin_clz(op);
}{ ... }
/* ... */
static ALWAYS_INLINE unsigned int find_lsb_set(uint32_t op)
{
return __builtin_ffs(op);
}{ ... }
#ifdef __cplusplus
}{...}
#endif
/* ... */
#endif