Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\wait_bit.c Create Date:2022-07-28 09:40:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:To allow interruptible waiting and asynchronous (i.e. nonblocking)* waiting, the actions of __wait_on_bit() and __wait_on_bit_lock() are* permitted return codes. Nonzero return codes halt waiting and return.

Proto:int __sched __wait_on_bit(struct wait_queue_head *wq_head, struct wait_bit_queue_entry *wbq_entry, wait_bit_action_f *action, unsigned mode)

Type:int

Parameter:

TypeParameterName
struct wait_queue_head *wq_head
struct wait_bit_queue_entry *wbq_entry
wait_bit_action_f *action
unsignedmode
44  ret = 0
46  Do
47  Note: we use "set_current_state()" _after_ the wait-queue add,* because we need a memory barrier there on SMP, so that any* wake-function that tests for the wait-queue being active* will be guaranteed to see waitqueue addition _or_ subsequent
48  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then ret = ( * action)( & key, mode)
50  When st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from && Not ret cycle
52  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
54  Return ret
Caller
NameDescribe
out_of_line_wait_on_bit
out_of_line_wait_on_bit_timeout