1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 08:22:04 +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) {
this->ParseSymbolTable<struct nlist_64>(exe_start, reinterpret_cast<const struct symtab_command *>(lc));
} else {
this->ParseSymbolTable<struct nlist>(exe_start, reinterpret_cast<const struct symtab_command *>(lc));
}
break;

View file

@ -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) {