函数逻辑报告 |
Source Code:kernel\futex.c |
Create Date:2022-07-27 11:54:49 |
| Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Userspace attempted a TID -> 0 atomic transition, and failed.* This is the in-kernel slowpath: we look up the PI state (if any),* and do the rt-mutex unlock.
函数原型:static int futex_unlock_pi(unsigned int __user *uaddr, unsigned int flags)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| unsigned int __user * | uaddr | |
| unsigned int | flags |
| 3070 | curval等于curval, vpid等于task_pid_vnr(当前进程) |
| 3071 | key等于FUTEX_KEY_INIT |
| 3076 | 如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_FUTEX_PI)则返回:负ENOSYS |
| 3079 | retry : |
| 3080 | 如果Careful: we have to cast the result to the type of the pointer* for sign reasons(uval, uaddr)则返回:负EFAULT |
| 3085 | 如果uval按位与The rest of the robust-futex field is for the TID:的值不等于vpid则返回:负EPERM |
| 3093 | 加自旋锁 |
| 3101 | 如果top_waiter则 |
| 3105 | 如果非pi_state则转到:out_unlock |
| 3112 | 如果owner不等于当前进程则转到:out_unlock |
| 3115 | get_pi_state(pi_state) |
| 3127 | 自旋锁解锁 |
| 3132 | Drops a reference to the pi_state object and frees or caches it* when the last reference is gone. |
| 3137 | 如果非ret则转到:out_putkey |
| 3143 | 如果ret恒等于负EFAULT则转到:pi_faulted |
| 3155 | 转到:out_putkey |
| 3165 | 如果ret等于cmpxchg_futex_value_locked( & curval, uaddr, uval, 0)则 |
| 3185 | out_unlock : |
| 3186 | 自旋锁解锁 |
| 3187 | out_putkey : |
| 3188 | put_futex_key( & key) |
| 3189 | 返回:ret |
| 3191 | pi_retry : |
| 3192 | put_futex_key( & key) |
| 3193 | cond_resched() |
| 3194 | 转到:retry |
| 3196 | pi_faulted : |
| 3197 | put_futex_key( & key) |
| 3203 | 返回:ret |
| 名称 | 描述 |
|---|---|
| do_futex |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |