mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 14:55:39 +00:00
Merge pull request #507 from Azaezel/alpha40/pthreadPunishment
adress #501 - thread oversight.
This commit is contained in:
commit
8d2e806413
1 changed files with 8 additions and 2 deletions
|
|
@ -133,9 +133,15 @@ void tc_spinloop()
|
||||||
// Pause would do nothing on the Xbox. Threads are not scheduled.
|
// Pause would do nothing on the Xbox. Threads are not scheduled.
|
||||||
#elif defined( _WIN64 )
|
#elif defined( _WIN64 )
|
||||||
YieldProcessor( );
|
YieldProcessor( );
|
||||||
#elif defined( __APPLE__ )||(__linux__)
|
#elif defined( __APPLE__ )
|
||||||
pthread_yield_np();
|
pthread_yield_np();
|
||||||
#else
|
#elif defined(__linux__)
|
||||||
|
#if defined(_POSIX_PRIORITY_SCHEDULING)
|
||||||
|
sched_yield();
|
||||||
|
#else
|
||||||
|
asm("pause");
|
||||||
|
#endif
|
||||||
|
#elif
|
||||||
__asm { pause };
|
__asm { pause };
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue