Skip to content

move generic parts of wasm_suspend_flags.h to bh_atomic.h#2393

Merged
wenyongh merged 1 commit intobytecodealliance:mainfrom
yamt:bh_atomic
Jul 27, 2023
Merged

move generic parts of wasm_suspend_flags.h to bh_atomic.h#2393
wenyongh merged 1 commit intobytecodealliance:mainfrom
yamt:bh_atomic

Conversation

@yamt
Copy link
Contributor

@yamt yamt commented Jul 26, 2023

No description provided.

@yamt yamt force-pushed the bh_atomic branch 2 times, most recently from cf7950b to 5dcb000 Compare July 26, 2023 08:06
@loganek
Copy link
Contributor

loganek commented Jul 26, 2023

I'd expect bh_atomic to use stdatomics when possible; suspend_flag is an exception and should not use stdatomics (due to reasons explained in the linked PR). So my preference would be to keep those two separate, even if that means having some code duplicated (unless we do some ifdef's magic to only use builtin atomics in suspend_flag, but then I'm not sure if the complexity of code is worth the benefit we'll get).

@yamt
Copy link
Contributor Author

yamt commented Jul 26, 2023

I'd expect bh_atomic to use stdatomics when possible; suspend_flag is an exception and should not use stdatomics (due to reasons explained in the linked PR). So my preference would be to keep those two separate, even if that means having some code duplicated (unless we do some ifdef's magic to only use builtin atomics in suspend_flag, but then I'm not sure if the complexity of code is worth the benefit we'll get).

given how our aot compilation works, many of our runtime structures are
very sensitive to size/offset changes. it isn't only suspend_flags for which the "fixed-sized"
property can be convenient.

Copy link
Collaborator

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyongh wenyongh merged commit 228417a into bytecodealliance:main Jul 27, 2023
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
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