Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Jan 28, 2026

  • Add a MemoryOrder argument for BinaryenAtomicLoad, BinaryenAtomicStore, BinaryenAtomicRMW, and BinaryenAtomicCmpxchg.
  • Add getters and setters for memory order for these operations.

Part of #8165

Base automatically changed from relaxed-atomic-compare to main January 29, 2026 00:43
@stevenfontanella stevenfontanella force-pushed the relaxed-atomics-api branch 4 times, most recently from ef937a5 to b08108e Compare January 29, 2026 22:46
@stevenfontanella stevenfontanella changed the title Relaxed atomics api Update C and JS libraries with relaxed atomics support Jan 29, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review January 30, 2026 01:06
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Please update the changelog with the breaking changes.

Module['MemoryOrder'] = {};
[ 'Unordered',
'SeqCst',
'AcqRel'
Copy link
Member

Choose a reason for hiding this comment

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

I think lowercase is more consistent for the values: we try to match the wasm text format where possible.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe the new github UI is confusing me, but this seems to be marked resolved although the values are still uppercase? SeqCst instead of seqcst as in the text format etc.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, they are converted below... got it.

@stevenfontanella
Copy link
Member Author

Forgot a couple things, will send another update.

Current Trunk
-------------
- The c api now has separate functions for `CallRef` and `ReturnCallRef` matching the semantics of `Call` and `ReturnCall`.
- The C api now has separate functions for `CallRef` and `ReturnCallRef` matching the semantics of `Call` and `ReturnCall`.
Copy link
Member

Choose a reason for hiding this comment

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

Please add PR numbers to each line here.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm with changelog fixes

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.

4 participants