[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] fix timer bug
From: |
Damien Zammit |
Subject: |
[PATCH 3/5] fix timer bug |
Date: |
Fri, 26 Mar 2021 20:48:48 +1100 |
---
kern/mach_clock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index e4d44f57..ed5cdfd3 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 thread exists */
+ 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 */
--
2.30.1
- gnumach: IOAPIC and LAPIC support, Damien Zammit, 2021/03/26
- [PATCH 2/5] fixup acpi base table search, Damien Zammit, 2021/03/26
- [PATCH 1/5] Make linux drivers optional, Damien Zammit, 2021/03/26
- [PATCH 3/5] fix timer bug,
Damien Zammit <=
- [PATCH 4/5] fix EISA check in init_IRQ, Damien Zammit, 2021/03/26
- [PATCH 5/5] ioapic interrupts and lapic timer support, Damien Zammit, 2021/03/26
- Re: gnumach: IOAPIC and LAPIC support, Samuel Thibault, 2021/03/26