Skip to content

ref(sync): promote shared spinlock helper - #1964

Merged
jpnurmi merged 1 commit into
masterfrom
jpnurmi/ref/spinlock
Aug 6, 2026
Merged

ref(sync): promote shared spinlock helper#1964
jpnurmi merged 1 commit into
masterfrom
jpnurmi/ref/spinlock

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Rename the Unix-only spinlock header to sentry_spinlock.h and make the primitive available and tested on all platforms, as needed for the thread-pooled telemetry batcher in #1946.

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.

#skip-changelog (internal)

Comment thread src/sentry_spinlock.h
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
jpnurmi force-pushed the jpnurmi/ref/spinlock branch from c8d075e to 74e1e35 Compare August 6, 2026 10:51
@jpnurmi
jpnurmi requested a review from JoshuaMoelans August 6, 2026 11:21
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.01%. Comparing base (159d185) to head (74e1e35).
⚠️ Report is 1 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi requested a review from limbonaut August 6, 2026 11:47
@jpnurmi
jpnurmi merged commit 219d934 into master Aug 6, 2026
102 of 104 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ref/spinlock branch August 6, 2026 14:45
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