@@ -1080,32 +1080,15 @@ static inline bool fastpath_timer_check(struct task_struct *tsk)
1080
1080
return false;
1081
1081
}
1082
1082
1083
- /*
1084
- * This is called from the timer interrupt handler. The irq handler has
1085
- * already updated our counts. We need to check if any timers fire now.
1086
- * Interrupts are disabled.
1087
- */
1088
- void run_posix_cpu_timers (void )
1083
+ static void __run_posix_cpu_timers (struct task_struct * tsk )
1089
1084
{
1090
- struct task_struct * tsk = current ;
1091
1085
struct k_itimer * timer , * next ;
1092
1086
unsigned long flags ;
1093
1087
LIST_HEAD (firing );
1094
1088
1095
- lockdep_assert_irqs_disabled ();
1096
-
1097
- /*
1098
- * The fast path checks that there are no expired thread or thread
1099
- * group timers. If that's so, just return.
1100
- */
1101
- if (!fastpath_timer_check (tsk ))
1089
+ if (!lock_task_sighand (tsk , & flags ))
1102
1090
return ;
1103
1091
1104
- lockdep_posixtimer_enter ();
1105
- if (!lock_task_sighand (tsk , & flags )) {
1106
- lockdep_posixtimer_exit ();
1107
- return ;
1108
- }
1109
1092
/*
1110
1093
* Here we take off tsk->signal->cpu_timers[N] and
1111
1094
* tsk->cpu_timers[N] all the timers that are firing, and
@@ -1147,6 +1130,28 @@ void run_posix_cpu_timers(void)
1147
1130
cpu_timer_fire (timer );
1148
1131
spin_unlock (& timer -> it_lock );
1149
1132
}
1133
+ }
1134
+
1135
+ /*
1136
+ * This is called from the timer interrupt handler. The irq handler has
1137
+ * already updated our counts. We need to check if any timers fire now.
1138
+ * Interrupts are disabled.
1139
+ */
1140
+ void run_posix_cpu_timers (void )
1141
+ {
1142
+ struct task_struct * tsk = current ;
1143
+
1144
+ lockdep_assert_irqs_disabled ();
1145
+
1146
+ /*
1147
+ * The fast path checks that there are no expired thread or thread
1148
+ * group timers. If that's so, just return.
1149
+ */
1150
+ if (!fastpath_timer_check (tsk ))
1151
+ return ;
1152
+
1153
+ lockdep_posixtimer_enter ();
1154
+ __run_posix_cpu_timers (tsk );
1150
1155
lockdep_posixtimer_exit ();
1151
1156
}
1152
1157
0 commit comments