函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-27 11:54:34
Last Modify:2020-03-17 15:28:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int futex_wait_setup(unsigned int __user *uaddr, unsigned int val, unsigned int flags, struct futex_q *q, struct futex_hash_bucket **hb)

返回类型:int

参数:

类型参数名称
unsigned int __user *uaddr
unsigned intval
unsigned intflags
struct futex_q *q
struct futex_hash_bucket **hb
2751  retry :
2752  ret等于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
2753  如果此条件成立可能性小(为编译器优化)(ret != 0)则返回:ret
2756  retry_private :
2757  hb等于The key must be already stored in q->key.
2759  ret等于get_futex_value_locked( & uval, uaddr)
2761  如果ret
2762  queue_unlock( * hb)
2764  ret等于Careful: we have to cast the result to the type of the pointer* for sign reasons(uval, uaddr)
2765  如果ret则转到:out
2768  如果非flags按位与Futex flags used to encode options to functions and preserve them across* restarts.的值则转到:retry_private
2771  put_futex_key( & key)
2772  转到:retry
2775  如果uval不等于val
2776  queue_unlock( * hb)
2777  ret等于负EWOULDBLOCK
2780  out :
2781  如果retput_futex_key( & key)
2783  返回:ret
调用者
名称描述
futex_wait
futex_wait_requeue_piex_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