函数逻辑报告 |
Source Code:kernel\futex.c |
Create Date:2022-07-27 11:53:32 |
Last Modify:2020-03-17 15:28:32 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:static int get_futex_key(unsigned int __user *uaddr, int fshared, union futex_key *key, enum futex_access rw)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned int __user * | uaddr | |
int | fshared | |
union futex_key * | key | |
enum futex_access | rw |
533 | ro等于0 |
539 | 如果此条件成立可能性小(为编译器优化)((address % sizeof(u32)) != 0)则返回:负EINVAL |
546 | 如果此条件成立可能性小(为编译器优化)(should_fail_futex(fshared))则返回:负EFAULT |
556 | 如果非fshared则 |
560 | 返回:0 |
563 | again : |
565 | 如果此条件成立可能性小(为编译器优化)(should_fail_futex(fshared))则返回:负EFAULT |
568 | err等于get_user_pages_fast(address, 1, check pte is writable , & page) |
573 | 如果err恒等于负EFAULT且rw恒等于FUTEX_READ则 |
574 | err等于get_user_pages_fast(address, 1, 0, & page) |
575 | ro等于1 |
579 | 否则err等于0 |
601 | page等于compound_head(page) |
619 | 如果此条件成立可能性小(为编译器优化)(!mapping)则 |
653 | 如果此条件成立可能性小(为编译器优化)(should_fail_futex(fshared))或ro则 |
664 | 否则 |
680 | 如果READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS )不等于mapping则 |
684 | 转到:again |
688 | 如果非inode则 |
692 | 转到:again |
711 | 转到:again |
715 | 如果WARN_ON_ONCE(i_mapping != mapping)则 |
729 | out : |
731 | 返回:err |
名称 | 描述 |
---|---|
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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |