-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[ctime] fixup of data racing #8187
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
polarvid
force-pushed
the
shell/fix-ctime
branch
from
October 25, 2023 11:22
b2f76d9
to
c6cfda6
Compare
geniusgogo
requested changes
Oct 25, 2023
polarvid
force-pushed
the
shell/fix-ctime
branch
2 times, most recently
from
October 25, 2023 12:32
39a94d0
to
0178e2a
Compare
Signed-off-by: Shell <[email protected]>
polarvid
force-pushed
the
shell/fix-ctime
branch
from
October 25, 2023 12:35
0178e2a
to
121d825
Compare
现在定义更乱了…… Lines 495 to 514 in 3283f54
一下是 typedef struct rt_spinlock rt_spinlock_t;
struct rt_spinlock
{
rt_hw_spinlock_t lock;
}; 非 SMP 又是 typedef rt_ubase_t rt_spinlock_t;
struct rt_spinlock
{
rt_spinlock_t lock;
}; 让人摸不着头脑 |
非smp时, rt_spinlock_t 的值就会通过宏传到rt_hw_interrupt_enable(level)里面去,所以非smp的rt_spinlock_t 就得是个常量 |
geniusgogo
approved these changes
Oct 26, 2023
先不讨论具体怎么改。从原则来说,如果改 rt_spinlock_t 为结构体在非 SMP 遇到使用的问题,也得是纠正错误的用法呀。非 SMP 的时候当作整型来用,这种设计不是很合理。这样搞下去,代码会越来越乱,到处是莫名其妙的兼容逻辑。 |
Guozhanxin
approved these changes
Oct 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
Fixup of data racing in shared timer id list of
ctime.c
你的解决方案是什么 (what is your solution)
在什么测试环境下测试通过 (what is the test environment)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up