函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:prepare_to_swait_event

函数原型:long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state)

返回类型:long

参数:

类型参数名称
struct swait_queue_head *q
struct swait_queue *wait
intstate
93  ret等于0
95  raw_spin_lock_irqsave( & lock, flags)
96  如果signal_pending_state(state, 当前进程)则
101  删除链表项并重新初始化
102  ret等于负These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see.
103  否则
104  __prepare_to_swait(q, wait)
105  set_current_state(state)
107  raw_spin_unlock_irqrestore( & lock, flags)
109  返回:ret