函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\posix-cpu-timers.c Create Date:2022-07-27 11:48:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This 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.

函数原型:void run_posix_cpu_timers(void)

返回类型:void

参数:

1115  tsk等于当前进程
1118  LIST_HEAD(firing)
1120  lockdep_assert_irqs_disabled()
1126  如果非astpath_timer_check - POSIX CPU timers fast path.*@tsk: The task (thread) being checked.* Check the task and thread group timers. If both are zero (there are no* timers set) return false. Otherwise snapshot the task and thread group则返回
1129  如果非lock_task_sighand(tsk, & flags)则返回
1136  Check for any per-thread CPU timers that have fired and move them off* the tsk->cpu_timers[N] list onto the firing list. Here we update the
1138  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.
1148  unlock_task_sighand(tsk, & flags)
1159  加自旋锁
1160  删除链表项并重新初始化
1161  cpu_firing等于firing
1162  firing等于0
1168  如果此条件成立可能性大(为编译器优化)(cpu_firing >= 0)则The timer is locked, fire it and arrange for its reload.
1170  自旋锁解锁
调用者
名称描述
update_process_timesCalled from the timer interrupt handler to charge one tick to the current* process. user_tick is 1 if the tick is user time, 0 for system.