Function report |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-28 13:19:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:d 'struct bpf_spin_lock' in map value.* return >= 0 offset if found* and < 0 in case of error
Proto:int btf_find_spin_lock(const struct btf *btf, const struct btf_type *t)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct btf * | btf | |
const struct btf_type * | t |
2297 | If Not __btf_type_is_struct(t) Then Return -EINVAL |
2301 | member_type = btf_type_by_id(btf, type) |
2303 | If Not __btf_type_is_struct(member_type) Then Continue |
2305 | If size != size of bpf_spin_lock Then Continue |
2307 | If strcmp(__btf_name_by_offset(btf, name_off), "bpf_spin_lock") Then Continue |
2313 | off = btf_member_bit_offset(t, member) |
2317 | off /= 8 |
2318 | If off % __alignof__(structbpf_spin_lock) Then Return -EINVAL |
2322 | Return off |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |