Function report |
Source Code:kernel\bpf\syscall.c |
Create Date:2022-07-28 12:54:11 |
Last Modify:2022-05-19 18:06:12 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bpf_map_get_fd_by_id
Proto:static int bpf_map_get_fd_by_id(const union bpf_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const union bpf_attr * | attr |
2347 | If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_MAP_GET_FD_BY_ID) || open_flags & ~BPF_OBJ_FLAG_MASK Then Return -EINVAL |
2351 | If Not Check operation authority Then Return -EPERM |
2354 | f_flags = bpf_get_file_flag(open_flags) |
2358 | spin_lock_bh( & map_idr_lock) |
2360 | If map Then map = map_idr_lock should have been held |
2364 | spin_unlock_bh( & map_idr_lock) |
2369 | fd = bpf_map_new_fd(map, f_flags) |
2370 | If fd < 0 Then bpf_map_put_with_uref(map) |
2373 | Return fd |
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 |