Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:prepare_to_swait_event

Proto:long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state)

Type:long

Parameter:

TypeParameterName
struct swait_queue_head *q
struct swait_queue *wait
intstate
93  ret = 0
95  raw_spin_lock_irqsave( & lock, flags)
96  If signal_pending_state(state, current process) Then
101  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
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  Else
104  __prepare_to_swait(q, wait)
105  set_current_state(state)
107  raw_spin_unlock_irqrestore( & lock, flags)
109  Return ret