View Single Post
  #19 (permalink)  
Old 10-06-2005, 07:03 PM
Niklas Holsti
Guest
 
Posts: n/a
Default Re: volatile vs aliased

Björn Persson wrote:

> And why would you use pragma Volatile on a variable stored in the
> memory, anyway? As Ludovic described it, it would only be useful on
> variables mapped to special hardware devices. I don't think you would
> want to store a counter there.


Spin-locks for multiprocessor systems; variables used for
lock-free task synchronization; other variables directly shared
between tasks without being enclosed in protected objects (but
protected by some other synchronization logic, one would hope).

--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
Reply With Quote