1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 16:32:05 +00:00

os: pthread_yield is deprecated, don't use it on linux

This commit is contained in:
Michael Scire 2022-06-27 15:36:04 -07:00
parent 6514e365ad
commit 8e17feff94
2 changed files with 2 additions and 6 deletions

View file

@ -117,7 +117,6 @@ namespace ams::diag::impl {
if (is_64) { if (is_64) {
this->ParseSymbolTable<struct nlist_64>(exe_start, reinterpret_cast<const struct symtab_command *>(lc)); this->ParseSymbolTable<struct nlist_64>(exe_start, reinterpret_cast<const struct symtab_command *>(lc));
} else { } else {
this->ParseSymbolTable<struct nlist>(exe_start, reinterpret_cast<const struct symtab_command *>(lc)); this->ParseSymbolTable<struct nlist>(exe_start, reinterpret_cast<const struct symtab_command *>(lc));
} }
break; break;

View file

@ -202,13 +202,10 @@ namespace ams::os::impl {
} }
void ThreadManagerPthreadImpl::YieldThread() { void ThreadManagerPthreadImpl::YieldThread() {
#if defined(ATMOSPHERE_OS_MACOS) /* NOTE: pthread_yield() is deprecated. */
sched_yield(); const auto ret = sched_yield();
#else
const auto ret = pthread_yield();
AMS_ASSERT(ret == 0); AMS_ASSERT(ret == 0);
AMS_UNUSED(ret); AMS_UNUSED(ret);
#endif
} }
bool ThreadManagerPthreadImpl::ChangePriority(ThreadType *thread, s32 priority) { bool ThreadManagerPthreadImpl::ChangePriority(ThreadType *thread, s32 priority) {