Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This is the entry point to schedule() from kernel preemption* off of irq context.* Note, that this is called and return with irqs disabled. This will* protect us against recursive calling from irq.

Proto:asmlinkage __visible void __sched preempt_schedule_irq(void)

Type:void

Parameter:Nothing

4336  BUG_ON(We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt. || !Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.())
4338  prev_state = exception_enter()
4340  Do
4341  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
4342  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
4343  __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
4344  local_irq_disable()
4345  sched_preempt_enable_no_resched()
4346  When need_resched() cycle
4348  exception_exit(prev_state)