函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\wait_bit.c Create Date:2022-07-27 10:41:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型: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)

返回类型:int

参数:

类型参数名称
struct wait_queue_head *wq_head
struct wait_bit_queue_entry *wbq_entry
wait_bit_action_f *action
unsignedmode
44  ret等于0
46  循环
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  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromret = ( * action)( & key, mode)
50 st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from且非ret循环
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  返回:ret
调用者
名称描述
out_of_line_wait_on_bit
out_of_line_wait_on_bit_timeout
__inode_wait_for_writebackWait for writeback on an inode to complete. Called with i_lock held.* Caller must make sure inode cannot go away when we drop i_lock.