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:
Pawel Dziepak
2013-12-20 01:31:32 +01:00
parent 6639514437
commit b258298c70
4 changed files with 15 additions and 2 deletions
+1
View File
@@ -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;