Function report |
Source Code:kernel\futex.c |
Create Date:2022-07-28 10:53:30 |
| Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:get_futex_key() - Get parameters which are the keys for a futex*@uaddr: virtual address of the futex*@fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED*@key: address where result is stored
Proto:static int get_futex_key(unsigned int __user *uaddr, int fshared, union futex_key *key, enum futex_access rw)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned int __user * | uaddr | |
| int | fshared | |
| union futex_key * | key | |
| enum futex_access | rw |
| 533 | ro = 0 |
| 539 | If Value for the false possibility is greater at compile time((address % sizeof(u32)) != 0) Then Return -EINVAL |
| 546 | If Value for the false possibility is greater at compile time(should_fail_futex(fshared)) Then Return -EFAULT |
| 556 | If Not fshared Then |
| 560 | Return 0 |
| 563 | again : |
| 565 | If Value for the false possibility is greater at compile time(should_fail_futex(fshared)) Then Return -EFAULT |
| 568 | err = get_user_pages_fast(address, 1, check pte is writable , & page) |
| 573 | If err == -EFAULT && rw == FUTEX_READ Then |
| 574 | err = get_user_pages_fast(address, 1, 0, & page) |
| 575 | ro = 1 |
| 579 | Else err = 0 |
| 601 | page = compound_head(page) |
| 664 | Else |
| 680 | If READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS ) != mapping Then |
| 684 | Go to again |
| 688 | If Not inode Then |
| 692 | Go to again |
| 711 | Go to again |
| 715 | If WARN_ON_ONCE(i_mapping != mapping) Then |
| 718 | put an inode |
| 720 | Go to out |
| 729 | out : |
| 731 | Return err |
| Name | Describe |
|---|---|
| futex_wake | Wake up waiters matching bitset queued on this futex (uaddr). |
| futex_wake_op | Wake up all waiters hashed on the physical page that is mapped* to this virtual address: |
| futex_requeue | ex_requeue() - Requeue waiters from uaddr1 to uaddr2*@uaddr1: source futex user address*@flags: futex flags (FLAGS_SHARED, etc |
| futex_wait_setup | ex_wait_setup() - Prepare to wait on a futex*@uaddr: the futex userspace address*@val: the expected value*@flags: futex flags (FLAGS_SHARED, etc.)*@q: the associated futex_q*@hb: storage for hash_bucket pointer to be returned to caller |
| 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 |
| futex_unlock_pi | 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. |
| futex_wait_requeue_pi | ex_wait_requeue_pi() - Wait on uaddr and take uaddr2*@uaddr: the futex we initially wait on (non-pi)*@flags: futex flags (FLAGS_SHARED, FLAGS_CLOCKRT, 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 |