compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc
raw| 1 | #define WIN32_LEAN_AND_MEAN |
| 2 | #include <windows.h> |
| 3 | #include <processthreadsapi.h> |
| 4 | |
| 5 | #ifndef PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE |
| 6 | #define PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE 34 |
| 7 | #endif |
| 8 | |
| 9 | static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) { |
| 10 | if (IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)) |
| 11 | __aarch64_have_lse_atomics = true; |
| 12 | } |