[PATCH] timecounters: Fix timehand generation read/write

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jun 3 21:00:57 UTC 2015


In my interpretation of the C standard this is implementation defined behaviour.  See also:

https://gcc.gnu.org/onlinedocs/gcc/Volatiles.html

----- Joerg Sonnenberger <joerg at britannica.bec.de> schrieb:
> On Wed, Jun 03, 2015 at 01:46:06PM +0200, Sebastian Huber wrote:
> > The compiler is free to re-order load/store instructions to non-volatile
> > variables around a load/store of a volatile variable.
> 
> This part is wrong. The *compiler* is not free to do such reorder. The
> CPU may, as it doesn't really care about volatile.
> 
> Joerg
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the freebsd-hackers mailing list