Function report |
Source Code:kernel\sysctl.c |
Create Date:2022-07-28 09:11:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:proc_do_static_key
Proto:int proc_do_static_key(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct ctl_table * | table | |
int | write | |
void __user * | buffer | |
size_t * | lenp | |
loff_t * | ppos |
3391 | DEFINE_MUTEX(static_key_mutex) |
3393 | struct ctl_table tmp = {data = & val, maxlen = size of val , mode = mode, extra1 = Keep the same order as in fs/proc/proc_sysctl.c , extra2 = SYSCTL_ONE, } |
3401 | If write && Not Check operation authority Then Return -EPERM |
3404 | mutex_lock( & static_key_mutex) |
3405 | val = static_key_enabled(key) |
3408 | If val Then static_key_enable(key) |
3410 | Else static_key_disable(key) |
3413 | mutex_unlock( & static_key_mutex) |
3414 | Return ret |
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 |