Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ze_task - send a freeze request to given task*@p: task to send the request to* If @p is freezing, the freeze request is sent either by sending a fake* signal (if it's not a kernel thread) or waking it up (if it's a kernel* thread)

Proto:bool freeze_task(struct task_struct *p)

Type:bool

Parameter:

TypeParameterName
struct task_struct *p
128  If freezer_should_skip(p) Then Return false
131  spin_lock_irqsave( & protects freezing and frozen transitions , flags)
132  If Not freezing(p) || frozen(p) Then
133  spin_unlock_irqrestore( & protects freezing and frozen transitions , flags)
134  Return false
137  If Not ( Per task flags (PF_*), defined further below: & I am a kernel thread ) Then fake_signal_wake_up(p)
139  Else wake_up_state(p, TASK_INTERRUPTIBLE)
142  spin_unlock_irqrestore( & protects freezing and frozen transitions , flags)
143  Return true
Caller
NameDescribe
try_to_freeze_tasks
freezer_attachTasks can be migrated into a different freezer anytime regardless of its* current state. freezer_attach() is responsible for making new tasks* conform to the current state.* Freezer state changes and task migration are synchronized via*@freezer->lock
freezer_forkzer_fork - cgroup post fork callback*@task: a task which has just been forked*@task has just been created and should conform to the current state of* the cgroup_freezer it belongs to. This function may race against* freezer_attach()
freeze_cgroup