[Linux] Use sched_yield instead of the deprecated pthread_yield

This commit is contained in:
Triang3l 2021-12-18 19:43:17 +03:00
parent a950dff87d
commit 701300e8e9
1 changed files with 1 additions and 5 deletions

View File

@ -14,6 +14,7 @@
#include "xenia/base/platform.h"
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <sys/eventfd.h>
#include <sys/syscall.h>
@ -28,7 +29,6 @@
#if XE_PLATFORM_ANDROID
#include <dlfcn.h>
#include <sched.h>
#include "xenia/base/main_android.h"
#include "xenia/base/string_util.h"
@ -128,11 +128,7 @@ uint32_t current_thread_system_id() {
}
void MaybeYield() {
#if XE_PLATFORM_ANDROID
sched_yield();
#else
pthread_yield();
#endif
__sync_synchronize();
}