函数逻辑报告 |
Source Code:kernel\futex.c |
Create Date:2022-07-27 11:54:20 |
Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ex_requeue() - Requeue waiters from uaddr1 to uaddr2*@uaddr1: source futex user address*@flags: futex flags (FLAGS_SHARED, etc
函数原型:static int futex_requeue(unsigned int __user *uaddr1, unsigned int flags, unsigned int __user *uaddr2, int nr_wake, int nr_requeue, unsigned int *cmpval, int requeue_pi)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned int __user * | uaddr1 | |
unsigned int | flags | |
unsigned int __user * | uaddr2 | |
int | nr_wake | |
int | nr_requeue | |
unsigned int * | cmpval | |
int | requeue_pi |
2003 | key1等于FUTEX_KEY_INIT, key2等于FUTEX_KEY_INIT |
2004 | drop_count等于0, task_count等于0 |
2005 | struct futex_pi_state * pi_state = NULL |
2010 | 如果nr_wake小于0或nr_requeue小于0则返回:负EINVAL |
2019 | 如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_FUTEX_PI)且requeue_pi则返回:负ENOSYS |
2022 | 如果requeue_pi则 |
2050 | retry : |
2052 | 如果此条件成立可能性小(为编译器优化)(ret != 0)则转到:out |
2056 | 如果此条件成立可能性小(为编译器优化)(ret != 0)则转到:out_put_key1 |
2065 | 转到:out_put_keys |
2071 | retry_private : |
2075 | 如果此条件成立可能性大(为编译器优化)(cmpval != NULL)则 |
2078 | ret等于get_futex_value_locked( & curval, uaddr1) |
2080 | 如果此条件成立可能性小(为编译器优化)(ret)则 |
2081 | double_unlock_hb(hb1, hb2) |
2084 | ret等于Careful: we have to cast the result to the type of the pointer* for sign reasons(curval, uaddr1) |
2085 | 如果ret则转到:out_put_keys |
2088 | 如果非flags按位与Futex flags used to encode options to functions and preserve them across* restarts.的值则转到:retry_private |
2091 | put_futex_key( & key2) |
2092 | put_futex_key( & key1) |
2093 | 转到:retry |
2097 | 转到:out_unlock |
2101 | 如果requeue_pi且task_count减nr_wake小于nr_requeue则 |
2102 | struct task_struct * exiting = NULL |
2123 | 如果ret大于0则 |
2125 | drop_count自加 |
2126 | task_count自加 |
2146 | 退出 |
2150 | double_unlock_hb(hb1, hb2) |
2152 | put_futex_key( & key2) |
2153 | put_futex_key( & key1) |
2157 | 转到:out |
2166 | double_unlock_hb(hb1, hb2) |
2168 | put_futex_key( & key2) |
2169 | put_futex_key( & key1) |
2176 | cond_resched() |
2177 | 转到:retry |
2178 | 默认 |
2179 | 转到:out_unlock |
2184 | 如果task_count减nr_wake大于等于nr_requeue则退出 |
2197 | 如果requeue_pi且非rt_waiter或非requeue_pi且rt_waiter或pi_state则 |
2209 | 如果task_count先自加小于等于nr_wake且非requeue_pi则 |
2224 | 如果requeue_pi则 |
2230 | get_pi_state(pi_state) |
2235 | 如果ret恒等于1则 |
2245 | drop_count自加 |
2246 | 继续下一循环 |
2247 | 否则如果ret则 |
2266 | drop_count自加 |
2274 | Drops a reference to the pi_state object and frees or caches it* when the last reference is gone. |
2276 | out_unlock : |
2277 | double_unlock_hb(hb1, hb2) |
2287 | 当drop_count先自减大于等于0循环 |
2290 | out_put_keys : |
2291 | put_futex_key( & key2) |
2292 | out_put_key1 : |
2293 | put_futex_key( & key1) |
2294 | out : |
2295 | 返回:如果ret则ret否则task_count |
名称 | 描述 |
---|---|
do_futex |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |