RT-Thread / RT-Thread/rt-thread
[Feature] Why not use compiler builtins atomic
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
Describe problem solved by the proposed feature
gcc和llvm都提供了builtin的atomic方法,为什么还需要自己实现一套 rt_hw_atomic_xxx ?
Describe your preferred solution
直接使用编译器的builtin atomic
https://llvm.org/docs/Atomics.html
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
Describe possible alternatives
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the rt_hw_atomic_xxx implementations and their call sites in the RT-Thread source, then compare their supported targets and compiler requirements with the GCC and LLVM atomic builtin documentation linked in the issue. Define the affected platforms and compatibility expectations before determining what a complete migration would require.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100