函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:bool freeze_task(struct task_struct *p)

返回类型:bool

参数:

类型参数名称
struct task_struct *p
128  如果freezer_should_skip(p)则返回:false
131  spin_lock_irqsave( & protects freezing and frozen transitions , flags)
132  如果非freezing(p)或frozen(p)则
133  spin_unlock_irqrestore( & protects freezing and frozen transitions , flags)
134  返回:false
137  如果非任务标志按位与I am a kernel thread 的值则fake_signal_wake_up(p)
139  否则wake_up_state(p, 睡眠态)
142  spin_unlock_irqrestore( & protects freezing and frozen transitions , flags)
143  返回:true
调用者
名称描述
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