Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 05d5723

Browse files
committed
Support OFS_PAUSE_INTRIN on aarch64
1 parent 5b0c699 commit 05d5723

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

OFS-lib/OFS_Util.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020
#include "OFS_Profiling.h"
2121
#include "OFS_FileLogging.h"
2222

23+
#ifdef __x86_64__ || _WIN32 || _WIN64
2324
#include "emmintrin.h" // for _mm_pause
24-
2525
#define OFS_PAUSE_INTRIN _mm_pause
26+
#elif __aarch64__
27+
#include <thread>
28+
#define OFS_PAUSE_INTRIN std::this_thread::yield
29+
#endif
2630

2731
// helper for FontAwesome. Version 4.7.0 2016 ttf
2832
#define ICON_FOLDER_OPEN "\xef\x81\xbc"
@@ -517,4 +521,4 @@ class Util {
517521
static uint32_t RandomColor(float s, float v, float alpha = 1.f) noexcept;
518522
};
519523

520-
#define FMT(fmt, ...) Util::Format(fmt, __VA_ARGS__)
524+
#define FMT(fmt, ...) Util::Format(fmt, __VA_ARGS__)

0 commit comments

Comments
 (0)