Skip to content

sync.stdatomic: add atomic_thread_fence(), cpu_relax() #24690

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

Merged
merged 14 commits into from
Jun 11, 2025

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented Jun 10, 2025

Add atomic_thread_fence() support.
Add cpu_relax() to support building low cpu-usage spin lock.

Copy link

Connected to Huly®: V_0.6-23046

@kbkpbot kbkpbot changed the title sync.stdatomic: add atomic_thread_fence() sync.stdatomic: add atomic_thread_fence(), cpu_relax() Jun 10, 2025
@spytheman spytheman requested a review from tankf33der June 11, 2025 05:40
@spytheman
Copy link
Member

@tankf33der, can you please check if v test vlib/sync will pass on riscv64, with this PR?

@kbkpbot
Copy link
Contributor Author

kbkpbot commented Jun 11, 2025

@tankf33der, can you please check if v test vlib/sync will pass on riscv64, with this PR?

I have no riscv64, so it need someone else help here. :)
BTW, I submit a new commit and try to support other platforms. (not tested yet)

@tankf33der
Copy link
Contributor

@tankf33der, can you please check if v test vlib/sync will pass on riscv64, with this PR?

latest v on ubuntu 24.10 successfully passed vlib/sync on master and on this PR.

@tankf33der
Copy link
Contributor

@tankf33der, can you please check if v test vlib/sync will pass on riscv64, with this PR?

I have no riscv64, so it need someone else help here. :) BTW, I submit a new commit and try to support other platforms. (not tested yet)

I can provide all the information on how to set up qemu+riscv64.
Just find me on Discord.

@spytheman
Copy link
Member

@kbkpbot, @tankf33der, thank you, for making V better.

@spytheman spytheman merged commit a9f4a94 into vlang:master Jun 11, 2025
70 checks passed
@kbkpbot kbkpbot deleted the fix-stdatomic-fence branch June 12, 2025 10:37
@kbkpbot
Copy link
Contributor Author

kbkpbot commented Jun 13, 2025

@tankf33der, can you please check if v test vlib/sync will pass on riscv64, with this PR?

I have no riscv64, so it need someone else help here. :) BTW, I submit a new commit and try to support other platforms. (not tested yet)

I can provide all the information on how to set up qemu+riscv64. Just find me on Discord.

Thank for information.
I just install qemu + riscv :)

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