函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Wake up all waiters hashed on the physical page that is mapped* to this virtual address:

函数原型:static int futex_wake_op(unsigned int __user *uaddr1, unsigned int flags, unsigned int __user *uaddr2, int nr_wake, int nr_wake2, int op)

返回类型:int

参数:

类型参数名称
unsigned int __user *uaddr1
unsigned intflags
unsigned int __user *uaddr2
intnr_wake
intnr_wake2
intop
1759  key1等于FUTEX_KEY_INIT, key2等于FUTEX_KEY_INIT
1765  retry :
1766  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
1767  如果此条件成立可能性小(为编译器优化)(ret != 0)则转到:out
1769  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
1770  如果此条件成立可能性小(为编译器优化)(ret != 0)则转到:out_put_key1
1773  hb1等于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.
1774  hb2等于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.
1776  retry_private :
1777  Express the locking dependencies for lockdep:
1778  op_ret等于futex_atomic_op_inuser(op, uaddr2)
1779  如果此条件成立可能性小(为编译器优化)(op_ret < 0)则
1780  double_unlock_hb(hb1, hb2)
1788  ret等于op_ret
1789  转到:out_put_keys
1792  如果op_ret恒等于负EFAULT
1794  如果ret则转到:out_put_keys
1799  cond_resched()
1800  转到:retry_private
1803  put_futex_key( & key2)
1804  put_futex_key( & key1)
1805  cond_resched()
1806  转到:retry
1809  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)
1811  如果pi_statert_waiter
1812  ret等于负EINVAL
1813  转到:out_unlock
1816  如果ret先自加大于等于nr_wake退出
1821  如果op_ret大于0则
1822  op_ret等于0
1834  ret加等于op_ret
1837  out_unlock :
1838  double_unlock_hb(hb1, hb2)
1839  wake_up_q( & wake_q)
1840  out_put_keys :
1841  put_futex_key( & key2)
1842  out_put_key1 :
1843  put_futex_key( & key1)
1844  out :
1845  返回:ret
调用者
名称描述
do_futex