-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine atomic operation flags in bh_atomic #2780
Conversation
f81f02b
to
e0aed13
Compare
91e942c
to
25864e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
i have a concern in the original change which introduced atomic 16. |
core/shared/utils/bh_atomic.h
Outdated
* reference to `__atomic_fetch_add_2' | ||
*/ | ||
#ifndef WASM_UINT16_IS_ATOMIC | ||
#if !defined(__linux__) && defined(__riscv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by !defined(__linux__)
here?
do you mean defined(__NuttX__)
?
also, why do you override it here, rather than having it in platform-specific headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess all non-linux/baremetal platforms has the same issue, not only nuttx, since the usage of the baremetal toolchain have nothing difference with other RTOS platform.
And you can also define the behavior in platfrom-specific setting, explicit settings always have the highest priority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about freebsd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the bsd family should be OK as linux, but I don't have a test on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fix spec test failure on NuttX with #2780, see: https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/6910450452
This also fix the build break in spec test of NuttX.