[fpc-pascal] threads, memory barriers and RTLeventSetEvent / RTLeventWaitFor

Jonas Maebe jonas at freepascal.org
Thu Oct 3 20:26:46 CEST 2019


On 01/10/2019 20:48, Sven Barth via fpc-pascal wrote:
> Martin <fpc at mfriebe.de <mailto:fpc at mfriebe.de>> schrieb am Di., 1. Okt.
> 2019, 17:19:
> 
>     Therefore my question:
>     Does RTLeventSetEvent / RTLeventWaitFor make sure memory is
>     synchronized
>     between threads?
> 
> The functions themselves AFAIK don't have any memory barriers, so it
> would depend solely on the OS primitives. 

The used OS-primitives do contain memory barriers (at least on Unix
platforms, but I would assume everywhere).


Jonas


More information about the fpc-pascal mailing list