kernel: Protect cpu_ent::active_time with sequential lock
atomic_{get, set}64() are problematic on architectures without 64 bit
compare and swap.
Also, using sequential lock instead of atomic access ensures that
any reads from cpu_ent::active_time won't require any writes to shared
memory.
This commit is contained in:
@@ -56,6 +56,7 @@ typedef struct cpu_ent {
|
||||
timer quantum_timer;
|
||||
|
||||
// keeping track of CPU activity
|
||||
seqlock active_time_lock;
|
||||
bigtime_t active_time;
|
||||
bigtime_t irq_time;
|
||||
bigtime_t interrupt_time;
|
||||
|
||||
Reference in New Issue
Block a user