<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">George Bakhtadze <<a href="mailto:armorcavalry@yandex.com">armorcavalry@yandex.com</a>> schrieb am Sa., 29. Juni 2019, 09:32:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> </div><blockquote><div><div>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. </div></div></blockquote><div> </div><div><div>I believe this assumption incorrect because it's not stated in documentation as correct.</div><div>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.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>