mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
clean up
This commit is contained in:
parent
31481931e8
commit
a81c6ebd06
8 changed files with 201 additions and 187 deletions
|
|
@ -133,14 +133,20 @@ void tc_sleep(NxU32 ms)
|
|||
|
||||
void tc_spinloop()
|
||||
{
|
||||
#if defined(__linux__) || defined( __APPLE__ ) || defined( __FreeBSD__)
|
||||
|
||||
asm ( "pause" );
|
||||
#elif defined( _XBOX )
|
||||
#if defined( _XBOX )
|
||||
// Pause would do nothing on the Xbox. Threads are not scheduled.
|
||||
#elif defined( _WIN64 )
|
||||
YieldProcessor( );
|
||||
#else
|
||||
#elif defined( __APPLE__ )
|
||||
pthread_yield_np();
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#if defined(_POSIX_PRIORITY_SCHEDULING)
|
||||
sched_yield();
|
||||
#else
|
||||
asm("pause");
|
||||
#endif
|
||||
#elif
|
||||
__asm { pause };
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue