CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2019/03/09 16:04:56

Modified files:
        sys/kern       : kern_tc.c 

Log message:
tc_windup: read active timecounter once at function start.

tc_windup() is not necessarily called with KERNEL_LOCK, so it is possible
for the timecounter pointer to change in the midst of the call via the
kern.timecounter.hardware sysctl(2).  Reading it once and using that local
copy ensures we're referring to the same timecounter consistently.

Apparently the compiler can optimize this out... somehow... so there may
be room for improvement.

Idea from visa@. With input from visa@, mpi@, cjeker@, and guenther@.

ok visa@ mpi@

Reply via email to