Merge pull request #507 from Azaezel/alpha40/pthreadPunishment

adress #501 - thread oversight.
This commit is contained in:
Brian Roberts 2021-07-28 13:31:51 -05:00 committed by GitHub
commit 8d2e806413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,9 +133,15 @@ void tc_spinloop()
// Pause would do nothing on the Xbox. Threads are not scheduled.
#elif defined( _WIN64 )
YieldProcessor( );
#elif defined( __APPLE__ )||(__linux__)
#elif defined( __APPLE__ )
pthread_yield_np();
#else
#elif defined(__linux__)
#if defined(_POSIX_PRIORITY_SCHEDULING)
sched_yield();
#else
asm("pause");
#endif
#elif
__asm { pause };
#endif
}