MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / JoinThreadGroup

Method JoinThreadGroup

src/task/task_control_block.cpp:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92auto TaskControlBlock::JoinThreadGroup(TaskControlBlock* leader) -> void {
93 if (!leader || leader == this) {
94 return;
95 }
96
97 // 设置 tgid
98 aux->tgid = leader->aux->tgid;
99
100 // 在 leader 之后插入自身
101 etl::link_splice<ThreadGroupLink>(*leader, *this);
102}
103
104auto TaskControlBlock::LeaveThreadGroup() -> void { ThreadGroupLink::unlink(); }
105

Callers 7

CloneMethod · 0.80
test_thread_group_basicFunction · 0.80
test_thread_exitFunction · 0.80
test_clone_threadFunction · 0.80
test_clone_parent_flagFunction · 0.80

Calls

no outgoing calls

Tested by 6

test_thread_group_basicFunction · 0.64
test_thread_exitFunction · 0.64
test_clone_threadFunction · 0.64
test_clone_parent_flagFunction · 0.64