From 8e17feff94d25ff4a8e775b964fbb7df6dcec9af Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 27 Jun 2022 15:36:04 -0700 Subject: [PATCH] os: pthread_yield is deprecated, don't use it on linux --- .../source/diag/impl/diag_symbol_impl.os.macos.cpp | 1 - .../source/os/impl/os_thread_manager_impl.pthread.inc | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libraries/libstratosphere/source/diag/impl/diag_symbol_impl.os.macos.cpp b/libraries/libstratosphere/source/diag/impl/diag_symbol_impl.os.macos.cpp index a2e143821..0507df85f 100644 --- a/libraries/libstratosphere/source/diag/impl/diag_symbol_impl.os.macos.cpp +++ b/libraries/libstratosphere/source/diag/impl/diag_symbol_impl.os.macos.cpp @@ -117,7 +117,6 @@ namespace ams::diag::impl { if (is_64) { this->ParseSymbolTable(exe_start, reinterpret_cast(lc)); } else { - this->ParseSymbolTable(exe_start, reinterpret_cast(lc)); } break; diff --git a/libraries/libstratosphere/source/os/impl/os_thread_manager_impl.pthread.inc b/libraries/libstratosphere/source/os/impl/os_thread_manager_impl.pthread.inc index 8f8f6f8a3..afbb4495c 100644 --- a/libraries/libstratosphere/source/os/impl/os_thread_manager_impl.pthread.inc +++ b/libraries/libstratosphere/source/os/impl/os_thread_manager_impl.pthread.inc @@ -202,13 +202,10 @@ namespace ams::os::impl { } void ThreadManagerPthreadImpl::YieldThread() { - #if defined(ATMOSPHERE_OS_MACOS) - sched_yield(); - #else - const auto ret = pthread_yield(); + /* NOTE: pthread_yield() is deprecated. */ + const auto ret = sched_yield(); AMS_ASSERT(ret == 0); AMS_UNUSED(ret); - #endif } bool ThreadManagerPthreadImpl::ChangePriority(ThreadType *thread, s32 priority) {