Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Check for any per-thread CPU timers that have fired and move them* off the tsk->*_timers list onto the firing list. Per-thread timers* have already been taken off.

Proto:static void check_process_timers(struct task_struct *tsk, struct list_head *firing)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
struct list_head *firing
906  sig = Signal handlers:
907  pct = Empty if CONFIG_POSIX_TIMERS=n
916  If Not READ_ONCE(timers_active) || expiry_active Then Return
923  expiry_active = true
929  proc_sample_cputime_atomic( & cputime_atomic, samples)
930  collect_posix_cputimers(pct, samples, firing)
935  check_cpu_itimer(tsk, & it[CPUCLOCK_PROF], & nextevt, samples[CPUCLOCK_PROF], SIGPROF)
938  check_cpu_itimer(tsk, & it[CPUCLOCK_VIRT], & nextevt, samples[CPUCLOCK_VIRT], SIGVTALRM)
942  soft = task_rlimit(tsk, RLIMIT_CPU)
943  If soft != RLIM_INFINITY Then
945  hard = task_rlimit_max(tsk, RLIMIT_CPU)
946  ptime = samples[CPUCLOCK_PROF]
947  softns = soft * NSEC_PER_SEC
948  hardns = hard * NSEC_PER_SEC
951  If hard != RLIM_INFINITY && check_rlimit(ptime, hardns, SIGKILL, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., true) Then Return
957  rlim_cur = soft + 1
958  softns += NSEC_PER_SEC
962  If softns < nextevt Then nextevt = softns
966  If Check whether all cache entries contain U64_MAX, i.e. eternal expiry time Then stop_process_timers(sig)
969  expiry_active = false
Caller
NameDescribe
run_posix_cpu_timersThis is called from the timer interrupt handler. The irq handler has* already updated our counts. We need to check if any timers fire now.* Interrupts are disabled.