Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__cond_resched_lock() - if a reschedule is pending, drop the given lock,* call schedule, and on return reacquire the lock

Proto:int __cond_resched_lock(spinlock_t *lock)

Type:int

Parameter:

TypeParameterName
spinlock_t *lock
5646  resched = Returns true when we need to resched and can (barring IRQ state).
5647  ret = 0
5649  lockdep_assert_held(lock)
5651  If Does a critical section need to be broken due to another* task waiting?: (technically does not depend on CONFIG_PREEMPTION,* but a general need for low latency) || resched Then
5652  spin_unlock(lock)
5653  If resched Then preempt_schedule_common()
5655  Else cpu_relax()
5657  ret = 1
5658  spin_lock(lock)
5660  Return ret