Skip to content

Instantly share code, notes, and snippets.

@colemancda
Last active March 5, 2022 12:16
Show Gist options
  • Save colemancda/e19ec96d8b3caa7f4a3f9ec9a82f356a to your computer and use it in GitHub Desktop.
Save colemancda/e19ec96d8b3caa7f4a3f9ec9a82f356a to your computer and use it in GitHub Desktop.
Dispatch 5.5.3 patched for Armv5
diff --git a/src/shims/yield.c b/src/shims/yield.c
index 43f0017..d0c5fff 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)) {
@colemancda
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment