Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sleep_range - Sleep for an approximate time*@min: Minimum time in usecs to sleep*@max: Maximum time in usecs to sleep* In non-atomic context where the exact wakeup time is flexible, use* usleep_range() instead of udelay()

Proto:void __sched usleep_range(unsigned long min, unsigned long max)

Type:void

Parameter:

TypeParameterName
unsigned longmin
unsigned longmax
2081  exp = ktime_add_us(ktime_get(), min)
2082  delta = (max - min) * NSEC_PER_USEC
2084  cycle
2085  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (TASK_UNINTERRUPTIBLE)
2087  If Not schedule_hrtimeout_range( & exp, delta, Time value is absolute) Then Break
Caller
NameDescribe
try_to_freeze_tasks