Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:35:35
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:deactivate_task

Proto:void deactivate_task(struct rq *rq, struct task_struct *p, int flags)

Type:void

Parameter:

TypeParameterName
struct rq *rq
struct task_struct *p
intflags
1331  on_rq = If flags & {de,en}queue flags:* DEQUEUE_SLEEP - task is no longer runnable* ENQUEUE_WAKEUP - task just became runnable* SAVE/RESTORE - an otherwise spurious dequeue/enqueue, done to ensure tasks* are in a known state which allows modification. Such pairs Then 0 Else TASK_ON_RQ_MIGRATING
1333  If task_contributes_to_load(p) Then * This is part of a global counter where only the total sum * over all CPUs matters. A task can increase this counter on * one CPU and if it got migrated afterwards it may decrease * it on another CPU. Always updated under the runqueue lock:++
1336  dequeue_task(rq, p, flags)
Caller
NameDescribe
__schedule__schedule() is the main scheduler function.* The main means of driving the scheduler and thus entering this function are:* 1. Explicit blocking: mutex, semaphore, waitqueue, etc.* 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return