summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/mach_clock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index e4d44f57..3a568647 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -152,7 +152,9 @@ void clock_interrupt(
timer_bump(&thread->user_timer, usec);
}
else {
- timer_bump(&thread->system_timer, usec);
+ /* Only bump timer if threads are initialized */
+ if (thread)
+ timer_bump(&thread->system_timer, usec);
}
#endif /* STAT_TIME */
@@ -189,6 +191,7 @@ void clock_interrupt(
if (usermode)
#endif
{
+ if (thread)
take_pc_sample_macro(thread, SAMPLED_PC_PERIODIC, usermode, pc);
}
#endif /* MACH_PCSAMPLE */