diff --git a/pw_bluetooth_sapphire/fuchsia/backends.bazelrc b/pw_bluetooth_sapphire/fuchsia/backends.bazelrc index bca99e5507..83f57d2837 100644 --- a/pw_bluetooth_sapphire/fuchsia/backends.bazelrc +++ b/pw_bluetooth_sapphire/fuchsia/backends.bazelrc @@ -29,6 +29,7 @@ common:fuchsia --@pigweed//pw_log:backend_impl=@pigweed//pw_build:empty_cc_libra common:fuchsia --@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest common:fuchsia --@pigweed//pw_async:task_backend=@pigweed//pw_async_fuchsia:task common:fuchsia --@pigweed//pw_async:fake_dispatcher_backend=@pigweed//pw_async_fuchsia:fake_dispatcher +common:fuchsia --@pigweed//pw_sync:interrupt_spin_lock_backend=@pigweed//pw_sync_stl:interrupt_spin_lock # TODO: https://pwbug.dev/374340793 - This is a temporary workaround for now and # this command line option shouldn't be applied more widely. diff --git a/pw_sync/public/pw_sync/yield_core.h b/pw_sync/public/pw_sync/yield_core.h index 4a04e2b0fb..313b1350ab 100644 --- a/pw_sync/public/pw_sync/yield_core.h +++ b/pw_sync/public/pw_sync/yield_core.h @@ -22,6 +22,10 @@ #elif defined(__aarch64__) || defined(__arm__) #define PW_SYNC_YIELD_CORE_FOR_SMT() asm volatile("yield" ::: "memory") +#elif defined(__Fuchsia__) +#include +#define PW_SYNC_YIELD_CORE_FOR_SMT() zx_thread_legacy_yield(0) + #else #error "No processor yield implementation for this architecture."