[vlc-devel] [PATCH] Support for Http Dynamic Streaming
Rémi Denis-Courmont
remi at remlab.net
Thu May 29 08:07:41 CEST 2014
Le 2014-05-29 13:48, Jonathan Thambidurai a écrit :
> The following is noted:
> -volatile was necessary because the compiler was optimizing out some
> memory accesses that were necessary because two threads were (safely)
> operating on the same data structure. Ive reshuffled some code since
> that time, so it may not still occur, but shouldnt hurt.
This statement is logically absurd, self-contradictory.
By definition, volatile protects memory accesses against optimization
within a single thread. This is necessary for such abnormal call flows
as asynchronous signal handlers (or interrupts in kernel mode), long
jumps and cooperative user context switches.
volatile has no defined semantics for concurrent access by different
threads.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list