Experimental atomic_gcc_sync change

This commit is contained in:
John Wellbelove 2020-08-04 11:40:31 +01:00
parent cdf660defe
commit 08fc80a2c5

View File

@ -469,7 +469,7 @@ namespace etl
// Pre-increment
T* operator ++()
{
return (T*)__sync_add_and_fetch(&value, sizeof(T));
return (T*)__sync_add_and_fetch(&(volatile void*)value, sizeof(T));
}
T* operator ++() volatile