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

make Sdl and subsystem structs zero sized #102

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

antonilol
Copy link
Contributor

These structs kept no state, only constants.

Also prevents SDL_COUNT from being modified from other threads than the main thread by keeping one count per subsystem type, not instance.

@antonilol
Copy link
Contributor Author

I also suspect that EventSubsystem::sdl is unsound, because it is Sync this can be called from any thread, not only the main thread, effectively copying instances of the Sdl struct to other threads.

@revmischa revmischa merged commit 0dae0ba into vhspace:master Feb 10, 2025
3 checks passed
@antonilol antonilol deleted the refcount-zst branch February 10, 2025 23:13
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.

2 participants