函数逻辑报告 |
Source Code:kernel\futex.c |
Create Date:2022-07-27 11:54:44 |
| Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Userspace tried a 0 -> TID atomic transition of the futex value* and failed. The kernel side here does the whole locking operation:* if there are waiters then it will block as a consequence of relying* on rt-mutexes, it does PI, etc
函数原型:static int futex_lock_pi(unsigned int __user *uaddr, unsigned int flags, ktime_t *time, int trylock)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| unsigned int __user * | uaddr | |
| unsigned int | flags | |
| ktime_t * | time | |
| int | trylock |
| 2881 | struct futex_pi_state * pi_state = NULL |
| 2882 | struct task_struct * exiting = NULL |
| 2885 | q等于futex_q_init |
| 2888 | 如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_FUTEX_PI)则返回:负ENOSYS |
| 2896 | retry : |
| 2898 | 如果此条件成立可能性小(为编译器优化)(ret != 0)则转到:out |
| 2901 | retry_private : |
| 2906 | 如果此条件成立可能性小(为编译器优化)(ret)则 |
| 2914 | ret等于0 |
| 2915 | 转到:out_unlock_put_key |
| 2917 | 转到:uaddr_faulted |
| 2936 | 默认 |
| 2937 | 转到:out_unlock_put_key |
| 2946 | __queue_me( & q, hb) |
| 2948 | 如果trylock则 |
| 2955 | rt_mutex_init_waiter( & rt_waiter) |
| 2971 | 自旋锁解锁 |
| 2978 | raw_spin_unlock_irq( & 保护自旋锁) |
| 2980 | 如果ret则 |
| 2989 | ret等于_mutex_wait_proxy_lock() - Wait for lock acquisition*@lock: the rt_mutex we were woken on*@to: the timeout, null if none |
| 2991 | cleanup : |
| 2992 | 加自旋锁 |
| 3005 | no_block : |
| 3022 | 如果ret且rt_mutex_owner( & The PI object:)恒等于当前进程则 |
| 3024 | get_pi_state(pi_state) |
| 3030 | 如果pi_state则 |
| 3031 | rt_mutex_futex_unlock( & The PI object:) |
| 3035 | 转到:out_put_key |
| 3037 | out_unlock_put_key : |
| 3038 | queue_unlock(hb) |
| 3040 | out_put_key : |
| 3041 | put_futex_key( & key) |
| 3042 | out : |
| 3043 | 如果to则 |
| 3045 | destroy_hrtimer_on_stack( & timer) |
| 3047 | 返回:如果ret不等于负EINTR则ret否则负ERESTARTNOINTR |
| 3049 | uaddr_faulted : |
| 3050 | queue_unlock(hb) |
| 3053 | 如果ret则转到:out_put_key |
| 3056 | 如果非flags按位与Futex flags used to encode options to functions and preserve them across* restarts.的值则转到:retry_private |
| 3059 | put_futex_key( & key) |
| 3060 | 转到:retry |
| 名称 | 描述 |
|---|---|
| do_futex |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |