diff options
author | Damien Zammit <damien@zamaudio.com> | 2021-03-26 20:48:48 +1100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-03-27 16:22:39 +0100 |
commit | 3097056b5091131b44591c849730d13fd6cca90a (patch) | |
tree | e4d591557e710a951286d8fe2eff4fd76c543905 /kern | |
parent | 70155c3a8a657994ad3f80697d3beb1365acde51 (diff) | |
download | gnumach-3097056b5091131b44591c849730d13fd6cca90a.tar.gz gnumach-3097056b5091131b44591c849730d13fd6cca90a.tar.bz2 gnumach-3097056b5091131b44591c849730d13fd6cca90a.zip |
clock: Let timer proceed even before we have set threads
Message-Id: <20210326094850.2606-4-damien@zamaudio.com>
Diffstat (limited to 'kern')
-rw-r--r-- | kern/mach_clock.c | 5 |
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 */ |