Skip to content
Commit e238c8b0 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

sched/clock/clock_systimer.c: Change the way that the 64-bit time is sampled....

sched/clock/clock_systimer.c:  Change the way that the 64-bit time is sampled.  Previously, we disabled interrupts before sampling the 64-bit timer since the uint64_t access is not atomic on most CPUs.  However, disabling (local) interrupts does not work in the SMP case.  In that case, the timer interrupt will be running on only one of the CPUs; disabling interrupts on a different CPU will provide no protection from timer rollover.  To work around this, logic was added that samples 64-bit timer is sampled twice and if 32-bit rollover was detected between samples, then loops until there is no rollover.
parent 4aeaf41d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment