From 6f715aa8cd1ecfec76f0a74888579e8ac91f41e0 Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Fri, 10 Dec 2021 11:26:02 +0100 Subject: [PATCH] Don't use WFE on non-Apple armeabi devices The WFE instruction can sometimes cause a SIGILL on these devices, so we use YIELD instead. https://bugs.swift.org/browse/SR-15166 --- src/shims/yield.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/yield.c b/src/shims/yield.c index 43f0017ee..d0c5fff92 100644 --- a/src/shims/yield.c +++ b/src/shims/yield.c @@ -36,7 +36,7 @@ void * _dispatch_wait_for_enqueuer(void **ptr) { #if !DISPATCH_HW_CONFIG_UP -#if defined(__arm__) || defined(__arm64__) +#if (defined(__arm__) && defined(__APPLE__)) || defined(__arm64__) int spins = DISPATCH_WAIT_SPINS_WFE; void *value; while (unlikely(spins-- > 0)) {