Skip to content
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

lab1-kalloc_test.c: static RefCount 需要添加 volatile 限定符 #6

Open
Invisiphantom opened this issue Oct 7, 2024 · 0 comments

Comments

@Invisiphantom
Copy link

启用 -O 优化
其他CPU修改 RefCount 后
当前CPU不会及时从内存更新 x0 的值

SYNC(1):
> 0x1100   ldr x0, [x19]
> 0x1104   cmp x0, #0x3
> 0x1108   b.le 0x1104  # 出现死循环
@Invisiphantom Invisiphantom changed the title lab1 RefCount 需要添加 volatile lab1-kalloc_test.c: static RefCount 需要添加 volatile 限定符 Oct 7, 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

No branches or pull requests

1 participant