Re: [fpc-pascal] Barriers semantics

2023-08-15 Thread Adriaan van Os via fpc-pascal
Jonas Maebe via fpc-pascal wrote: See e.g. the explanation of "data dependency barrier" at https://www.sobyte.net/post/2022-08/cpu-cache-and-memory-barriers/ . In Interesting stuff to read. Regards, Adriaan van Os ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Barriers semantics

2023-08-15 Thread Sven Barth via fpc-pascal
Jonas Maebe via fpc-pascal schrieb am Mo., 14. Aug. 2023, 21:02: > On 14/08/2023 18:19, denisgolovan via fpc-pascal wrote: > > Now we have "volatile" intrinsic for assignments in place, I'd like to > ask for another clarification. > > Just to make sure given your questions below: using volatile i

Re: [fpc-pascal] Barriers semantics

2023-08-14 Thread Jonas Maebe via fpc-pascal
On 14/08/2023 21:55, denisgolovan via fpc-pascal wrote: On 14/08/2023 18:19, denisgolovan via fpc-pascal wrote: ReadDependencyBarrier - which one is that? You cannot express a ReadDependencyBarrier in terms of acquire/release. See e.g. the explanation of "data dependency barrier" at https:/

Re: [fpc-pascal] Barriers semantics

2023-08-14 Thread denisgolovan via fpc-pascal
> On 14/08/2023 18:19, denisgolovan via fpc-pascal wrote: > >> Now we have "volatile" intrinsic for assignments in place, I'd like to ask >> for another clarification. > > Just to make sure given your questions below: using volatile in the > context of multithreaded code is completely wrong i

Re: [fpc-pascal] Barriers semantics

2023-08-14 Thread Jonas Maebe via fpc-pascal
On 14/08/2023 18:19, denisgolovan via fpc-pascal wrote: Now we have "volatile" intrinsic for assignments in place, I'd like to ask for another clarification. Just to make sure given your questions below: using volatile in the context of multithreaded code is completely wrong in 99.9% of the c

[fpc-pascal] Barriers semantics

2023-08-14 Thread denisgolovan via fpc-pascal
Hi all Now we have "volatile" intrinsic for assignments in place, I'd like to ask for another clarification. Documentation states we have following barriers - ReadBarrier, WriteBarrier, ReadDependencyBarrier, ReadWriteBarrier. I'd like to get an idea how those related to more common / standard