Skip to content

Conversation

@val213
Copy link
Contributor

@val213 val213 commented Nov 1, 2024

需求:#46

原本当前主线的 test_ebpf 结果(55e6f0b65f91b32638fd56581f711a816eccdcd1):
5ddb62be75b613c972f8d9590920a4e
本分支修改后的 test_ebpf 结果
该分支的 test_ebpf 输出
注释掉 dragonreach 主进程下 loop 内容后,当前主线下 test_ebpf 结果
21703189a0904cb916abe0b2357c187

@val213 val213 changed the title feat: 引入多线程读取 ctl 命名管道,用信号机制改写 service 和 task 的状态检查 feat(main): 引入多线程读取 ctl 命名管道,用信号机制改写 service 和 task 的状态检查 Nov 1, 2024
@fslongjin fslongjin requested a review from GnoCiYeH November 12, 2024 13:00
Comment on lines 84 to 85
if SIGCHILD_SIGNAL_RECEIVED.load(Ordering::SeqCst) {
SIGCHILD_SIGNAL_RECEIVED.store(false, Ordering::SeqCst);
Copy link
Member

@fslongjin fslongjin Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里用compare and exchange才对。否则可能有并发安全问题

if SIGCHILD_SIGNAL_RECEIVED.compare_exchange(true, false, Ordering::SeqCst, Ordering::SeqCst) {
.........
}

@fslongjin fslongjin merged commit 32c2329 into DragonOS-Community:master Nov 26, 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

Successfully merging this pull request may close these issues.

2 participants