Explicitly opt-in to READ_ONCE/WRITE_ONCE semantics

We mark all atomic variables as volatile and have our atomic accessors
built around that. We probably, therefore, want Linux-style
READ/WRITE_ONCE semantics of implying memory barriers. /volatile:ms does
this automatically.

This was already the default on amd64 and x86 but not on ARM.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reported-by: Lev Stipakov <lstipakov@gmail.com>
This commit is contained in:
Jason A. Donenfeld 2019-08-24 12:24:46 +00:00
parent e8e5a42e98
commit c072f4f3c4

View File

@ -125,6 +125,7 @@
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>NDIS_MINIPORT_DRIVER=1;NDIS620_MINIPORT=1;NDIS683_MINIPORT=1;NDIS_WDM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/volatile:ms %(AdditionalOptions)</AdditionalOptions>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
<ResourceCompile>
@ -175,4 +176,4 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
</Project>