Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Dynamically selects between Armv8.0 load, store exclusive instructions or Armv8.1 Large System Extension (LSE) atomic instructions based on CPU capability at runtime.
Syntax
/forceInterlockedFunctions
[-
]
Remarks
When possible, this flag avoids using Armv8.0 load and store exclusive instructions, as these instructions can result in livelocks. This flag forces the following interlocked intrinsics to be generated as out-of-line functions:
Operation | 8 | 16 | 32 | 64 | 128 | Pointer |
---|---|---|---|---|---|---|
Add | None | None | Full | Full | None | None |
And | Full | Full | Full | Full | None | None |
CompareExchange | Full | Full | Full | Full | Full | Full |
Decrement | None | Full | Full | Full | None | None |
Exchange | Full | Full | Full | Full | None | Full |
ExchangeAdd | Full | Full | Full | Full | None | None |
Increment | None | Full | Full | Full | None | None |
Or | Full | Full | Full | Full | None | None |
Xor | Full | Full | Full | Full | None | None |
bittestandreset | None | None | Full | Full | None | None |
bittestandset | None | None | Full | Full | None | None |
Key:
Full: supports plain,
_acq
,_rel
, and_nf
forms.None: Not supported
For more information about interlocked intrinsics, see the "Interlocked intrinsics" section in Arm64 Intrinsics.
To set the /forceInterlockedFunctions
compiler option in Visual Studio
Open the Property Pages dialog box for the project. For more information, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Command Line property page.
In the Additional options box, add
/forceInterlockedFunctions
to enable. Choose OK to save your changes.
To set this compiler option programmatically
- See AdditionalOptions.
See also
Arm64 Intrinsics
MSVC compiler options
MSVC compiler command-line syntax