Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-28 10:54:30
Last Modify:2020-03-17 15:28:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int futex_wait_setup(unsigned int __user *uaddr, unsigned int val, unsigned int flags, struct futex_q *q, struct futex_hash_bucket **hb)

Type:int

Parameter:

TypeParameterName
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  If Value for the false possibility is greater at compile time(ret != 0) Then Return ret
2756  retry_private :
2757  hb = The key must be already stored in q->key.
2759  ret = get_futex_value_locked( & uval, uaddr)
2761  If ret Then
2762  queue_unlock( * hb)
2764  ret = Get a simple variable from user space(uval, uaddr)
2765  If ret Then Go to out
2768  If Not (flags & Futex flags used to encode options to functions and preserve them across* restarts.) Then Go to retry_private
2771  put_futex_key( & key)
2772  Go to retry
2775  If uval != val Then
2776  queue_unlock( * hb)
2777  ret = -EWOULDBLOCK
2780  out :
2781  If ret Then put_futex_key( & key)
2783  Return ret
Caller
NameDescribe
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