Skip to content

Fix preprocessor logic error in pthread_mutex_trylock.c. NFC#26753

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_trylock
Apr 22, 2026
Merged

Fix preprocessor logic error in pthread_mutex_trylock.c. NFC#26753
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_trylock

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 22, 2026

This was a mistake from #24607. The only effect was that this extra (redundant) check was mistakenly included in release builds where its technically not needed.

@sbc100 sbc100 requested a review from kripken April 22, 2026 20:33
This was a mistake from emscripten-core#24607.  The only effect was that this extra
(redundant) check was mistakenly included in release builds where its
technically not needed.
@sbc100 sbc100 enabled auto-merge (squash) April 22, 2026 20:36
if ((type & 15) == PTHREAD_MUTEX_NORMAL) return 0;
#if defined(__EMSCRIPTEN__) && !defined(NDEBUG)
// Under emscripten we can get here for normal mutexes too, but only in debug
// Jbuilds (where we track ownership purely for debug purposes).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// Jbuilds (where we track ownership purely for debug purposes).
// builds (where we track ownership purely for debug purposes).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, will fix in followup.

@sbc100 sbc100 merged commit da9ffe6 into emscripten-core:main Apr 22, 2026
29 checks passed
@sbc100 sbc100 deleted the fix_trylock branch April 22, 2026 23:28
sbc100 added a commit that referenced this pull request Apr 23, 2026
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