Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Wake up waiters matching bitset queued on this futex (uaddr).

Proto:static int futex_wake(unsigned int __user *uaddr, unsigned int flags, int nr_wake, unsigned int bitset)

Type:int

Parameter:

TypeParameterName
unsigned int __user *uaddr
unsigned intflags
intnr_wake
unsigned intbitset
1660  key = FUTEX_KEY_INIT
1664  If Not bitset Then Return -EINVAL
1667  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
1668  If Value for the false possibility is greater at compile time(ret != 0) Then Go to out
1671  hb = hash_futex - Return the hash bucket in the global hash*@key: Pointer to the futex key for which the hash is calculated* We hash on the keys returned from get_futex_key (see below) and return the* corresponding hash bucket in the global hash.
1674  If Not hb_waiters_pending(hb) Then Go to out_put_key
1677  spin_lock( & lock)
1679  plist_for_each_entry_safe - iterate safely over list of given type*@pos: the type * to use as a loop counter*@n: another type * to use as temporary storage*@head: the head for your list*@m: the name of the list_head within the struct(this, next, & chain, list)
1681  If pi_state || rt_waiter Then
1682  ret = -EINVAL
1683  Break
1687  If Not (bitset & bitset) Then Continue
1691  If ++ret >= nr_wake Then Break
1696  spin_unlock( & lock)
1697  wake_up_q( & wake_q)
1698  out_put_key :
1699  put_futex_key( & key)
1700  out :
1701  Return ret
Caller
NameDescribe
handle_futex_deathProcess a futex-list entry, check whether it's owned by the* dying task, and do notification if so:
do_futex