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

Create abstraction for pthread_once()/InitOnceExecuteOnce() calls to avoid boilerplate code in many places and also to make other implementations possible. #6804

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

Create abstraction for pthread_once()/InitOnceExecuteOnce() calls to avoid boilerplate code in many places and also to make other implementations possible.

Some (e.g.) DSP targets don't have a working version of pthreads, so we can't rely on pthreads_once(). This provides a single bottleneck we can use to customize for those targets (rather than dozens spread across dozens of files), and makes the code pleasantly terser.

Note that this change should be functionally a no-op, just code refactoring to make upcoming changes more seamless.

…avoid boilerplate code in many places and also to make other implementations possible.

Some (e.g.) DSP targets don't have a working version of pthreads, so we can't rely on `pthreads_once()`. This provides a single bottleneck we can use to customize for those targets (rather than dozens spread across dozens of files), and makes the code pleasantly terser.

Note that this change should be functionally a no-op, just code refactoring to make upcoming changes more seamless.

PiperOrigin-RevId: 659754591
@copybara-service copybara-service bot merged commit 4f09c54 into master Aug 6, 2024
@copybara-service copybara-service bot deleted the test_659672037 branch August 6, 2024 01:46
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.

1 participant