User: Password:
Subscribe / Log in / New account

A fourth case

A fourth case

Posted Mar 29, 2011 21:43 UTC (Tue) by willy (subscriber, #9762)
Parent article: The trouble with volatile

I have a device which will DMA entries to a block of memory.
To determine if an entry is new or old, there is a phase bit which is flipped each time around the ring. So I rely on the compiler actually loading from memory, and not using a cached copy of that bit.

See uses of volatile in;...

(Log in to post comments)

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds