Function report |
Source Code:kernel\futex.c |
Create Date:2022-07-28 10:53:48 |
| Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int futex_lock_pi_atomic(unsigned int __user *uaddr, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps, struct task_struct *task, struct task_struct **exiting, int set_waiters)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned int __user * | uaddr | |
| struct futex_hash_bucket * | hb | |
| union futex_key * | key | |
| struct futex_pi_state ** | ps | |
| struct task_struct * | task | |
| struct task_struct ** | exiting | |
| int | set_waiters |
| 1428 | vpid = task_pid_vnr(task) |
| 1436 | If get_futex_value_locked( & uval, uaddr) Then Return -EFAULT |
| 1439 | If Value for the false possibility is greater at compile time(should_fail_futex(true)) Then Return -EFAULT |
| 1445 | If Value for the false possibility is greater at compile time((uval & The rest of the robust-futex field is for the TID:) == vpid) Then Return -EDEADLK |
| 1448 | If Value for the false possibility is greater at compile time(should_fail_futex(true)) Then Return -EDEADLK |
| 1456 | If top_waiter Then Return 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. |
| 1465 | If Not (uval & The rest of the robust-futex field is for the TID:) Then |
| 1474 | If set_waiters Then newval |= Are there any waiters for this robust futex: |
| 1477 | ret = lock_pi_update_atomic(uaddr, uval, newval) |
| 1488 | ret = lock_pi_update_atomic(uaddr, uval, newval) |
| 1496 | Return Lookup the task for the TID provided from user space and attach to* it after doing proper sanity checks. |
| Name | Describe |
|---|---|
| futex_proxy_trylock_atomic | ex_proxy_trylock_atomic() - Attempt an atomic lock for the top waiter*@pifutex: the user address of the to futex*@hb1: the from futex hash bucket, must be locked by the caller*@hb2: the to futex hash bucket, must be locked by the caller*@key1: the from |
| futex_lock_pi | 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 |
| 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 |