Skip to content

Commit 6f715aa

Browse files
committed
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
1 parent 880bf65 commit 6f715aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/yield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void *
3636
_dispatch_wait_for_enqueuer(void **ptr)
3737
{
3838
#if !DISPATCH_HW_CONFIG_UP
39-
#if defined(__arm__) || defined(__arm64__)
39+
#if (defined(__arm__) && defined(__APPLE__)) || defined(__arm64__)
4040
int spins = DISPATCH_WAIT_SPINS_WFE;
4141
void *value;
4242
while (unlikely(spins-- > 0)) {

0 commit comments

Comments
 (0)