mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
parent
0523736ce4
commit
77fe0c882b
@ -117,9 +117,18 @@ void Cpu_session_component::_unsynchronized_kill_thread(Thread_capability thread
|
||||
|
||||
void Cpu_session_component::kill_thread(Thread_capability thread_cap)
|
||||
{
|
||||
if (!thread_cap.valid())
|
||||
return;
|
||||
|
||||
Lock::Guard lock_guard(_thread_list_lock);
|
||||
|
||||
_unsynchronized_kill_thread(thread_cap);
|
||||
/* check that cap belongs to this session */
|
||||
for (Cpu_thread_component *t = _thread_list.first(); t; t = t->next()) {
|
||||
if (t->cap() == thread_cap) {
|
||||
_unsynchronized_kill_thread(thread_cap);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user