diff options
author | Marat Dukhan <maratek@gmail.com> | 2020-05-16 09:57:53 +0100 |
---|---|---|
committer | Marat Dukhan <maratek@gmail.com> | 2020-05-16 09:57:53 +0100 |
commit | afb880df0639945c854d70269f6b403cb81518b5 (patch) | |
tree | e69e0ef9c41414102141207e60ad05c5c7a46749 | |
parent | 5d088b1f1436e060cf2e2cd25c8c7003544eb266 (diff) | |
download | pthreadpool-afb880df0639945c854d70269f6b403cb81518b5.tar.gz |
Guard against generating ARM yield instruction for unsupporting processors
-rw-r--r-- | src/threadpool-atomics.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threadpool-atomics.h b/src/threadpool-atomics.h index cb193c6..f0ddd89 100644 --- a/src/threadpool-atomics.h +++ b/src/threadpool-atomics.h @@ -717,7 +717,7 @@ static inline void pthreadpool_yield() { __yield(); } -#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__)) +#elif defined(__GNUC__) && (defined(__ARM_ARCH) && (__ARM_ARCH >= 7) || (defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6KZ__)) && !defined(__thumb__)) static inline void pthreadpool_yield() { __asm__ __volatile__("yield"); } |