Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Apple Silicon #487

Merged
merged 2 commits into from
May 11, 2021

Conversation

JeffProgrammer
Copy link
Member

This adds support for running natively on the M1 Mac processors.

@@ -135,6 +135,8 @@ void tc_spinloop()
// Pause would do nothing on the Xbox. Threads are not scheduled.
#elif defined( _WIN64 )
YieldProcessor( );
#elif (defined( __arm64__ ) && defined( __APPLE__ )) || defined( __arch64__ )
asm( "yield" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not look like a good idea. Need to use an OS specific yield function call in order to cause the scheduler to intentionally yield/swap out the current process/thread effectively.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll replace it with pthread_yield()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants