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:finish_swait

Proto:void finish_swait(struct swait_queue_head *q, struct swait_queue *wait)

Type:void

Parameter:

TypeParameterName
struct swait_queue_head *q
struct swait_queue *wait
124  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
126  If Not list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using Then
127  raw_spin_lock_irqsave( & lock, flags)
128  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
129  raw_spin_unlock_irqrestore( & lock, flags)