[fpc-devel] "Maybe Gareth can be convinced to spend his energy on this ... "
Sven Barth
pascaldragon at googlemail.com
Sat Jun 29 12:52:14 CEST 2019
George Bakhtadze <armorcavalry at yandex.com> schrieb am Sa., 29. Juni 2019,
09:32:
>
>
> This assumption is *not* incorrect. Only on the LLVM based Delphi NewGen
> and FPC's LLVM backend the assumption is incorrect which can be seen by
> them having added "volatile" mechanisms.
>
>
> I believe this assumption incorrect because it's not stated in
> documentation as correct.
> If FPC somehow guarantees that a global field (even only of simple types)
> can be atomically read and written from any thread for ANY platform that is
> a very strong guarantee and worth mention in documentation.
>
It does not guarantee atomicity and it's not mentioned in the
documentation, but the non-LLVM backends *always* reaccess global variables
- and there is enough code out there, both FPC and Delphi/TP that (ab)use
this so that it can be considered pseudo documented.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190629/2341a1f1/attachment.html>
More information about the fpc-devel
mailing list