ref(sync): promote shared spinlock helper - #1964
Merged
Merged
Conversation
Rename the Unix-only spinlock header to sentry_spinlock.h and make the primitive available to all platforms. The Unix page allocator continues to use it, and other subsystems can now include the same narrow helper instead of putting spinlock code in sentry_sync.h. Add sentry__spinlock_try_lock and sentry__spinlock_wait alongside the existing lock and unlock operations. The wait variant lets callers bound a spin attempt with their own wait policy while keeping the primitive small and platform-independent.
jpnurmi
force-pushed
the
jpnurmi/ref/spinlock
branch
from
August 6, 2026 10:51
c8d075e to
74e1e35
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1964 +/- ##
==========================================
+ Coverage 75.97% 76.01% +0.03%
==========================================
Files 94 94
Lines 22167 22183 +16
Branches 3938 3937 -1
==========================================
+ Hits 16841 16862 +21
+ Misses 4440 4434 -6
- Partials 886 887 +1 🚀 New features to boost your workflow:
|
limbonaut
approved these changes
Aug 6, 2026
JoshuaMoelans
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename the Unix-only spinlock header to
sentry_spinlock.hand make the primitive available and tested on all platforms, as needed for the thread-pooled telemetry batcher in #1946.Add
sentry__spinlock_try_lockandsentry__spinlock_waitalongside the existing lock and unlock operations. The wait variant lets callers bound a spin attempt with their own wait policy while keeping the primitive small and platform-independent.#skip-changelog (internal)