]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When updating/accessing the timehands, barriers are needed to ensure
authorkib <kib@FreeBSD.org>
Tue, 9 Jun 2015 11:49:56 +0000 (11:49 +0000)
committerkib <kib@FreeBSD.org>
Tue, 9 Jun 2015 11:49:56 +0000 (11:49 +0000)
commit557733c8f37eac4667e3eef4422fcdd0556f73ca
tree642e4c5875889e8ea942463ac001ca80c1cff958
parent8d7fa71fca50afb21d91c5dff2c41a862513efe2
When updating/accessing the timehands, barriers are needed to ensure
that:
- th_generation update is visible after the parameters update is
  visible;
- the read of parameters is not reordered before initial read of
  th_generation.

On UP kernels, compiler barriers are enough.  For SMP machines, CPU
barriers must be used too, as was confirmed by submitter by testing on
the Freescale T4240 platform with 24 PowerPC processors.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 1 week
sys/kern/kern_tc.c