| Function report | 
| Source Code: kernel\futex.c | Create Date:2022-07-28 10:53:39 | 
| Last Modify:2020-03-17 15:28:32 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Validate that the existing waiter has a pi_state and sanity check* the pi_state against the user space value. If correct, attach to* it.
Proto:static int attach_to_pi_state(unsigned int __user *uaddr, unsigned int uval, struct futex_pi_state *pi_state, struct futex_pi_state **ps)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| unsigned int __user * | uaddr | |
| unsigned int | uval | |
| struct futex_pi_state * | pi_state | |
| struct futex_pi_state ** | ps | 
| 1072 | If Value for the false possibility is greater at compile time(!pi_state) Then Return -EINVAL | 
| 1093 | raw_spin_lock_irq( & wait_lock) | 
| 1101 | If get_futex_value_locked( & uval2, uaddr) Then Go to out_efault | 
| 1104 | If uval != uval2 Then Go to out_eagain | 
| 1116 | If Not owner Then | 
| 1121 | If pid Then Go to out_einval | 
| 1126 | Go to out_attach | 
| 1137 | If Not pid Then Go to out_attach | 
| 1139 | Else | 
| 1144 | If Not owner Then Go to out_einval | 
| 1153 | If pid != task_pid_vnr(owner) Then Go to out_einval | 
| 1156 | out_attach : | 
| 1157 | get_pi_state(pi_state) | 
| 1158 | raw_spin_unlock_irq( & wait_lock) | 
| 1160 | Return 0 | 
| 1162 | out_einval : | 
| 1164 | Go to out_error | 
| 1166 | out_eagain : | 
| 1168 | Go to out_error | 
| 1170 | out_efault : | 
| 1172 | Go to out_error | 
| 1174 | out_error : | 
| 1175 | raw_spin_unlock_irq( & wait_lock) | 
| 1176 | Return ret | 
| Name | Describe | 
|---|---|
| lookup_pi_state | |
| futex_lock_pi_atomic | ex_lock_pi_atomic() - Atomic work required to acquire a pi aware futex*@uaddr: the pi futex user address*@hb: the pi futex hash bucket*@key: the futex key associated with uaddr and hb*@ps: the pi_state pointer where we store the result of the* lookup | 
| 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 |