mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-19 16:41:26 +00:00
parent
9e089e7e75
commit
dbad6f7061
@ -334,13 +334,16 @@ void Thread::_call_new_thread()
|
||||
void Thread::_call_bin_thread()
|
||||
{
|
||||
/* check permissions */
|
||||
assert(_core());
|
||||
|
||||
/* get targeted thread */
|
||||
unsigned thread_id = (unsigned)user_arg_1();
|
||||
Thread * const thread = Thread::pool()->object(thread_id);
|
||||
assert(thread);
|
||||
|
||||
if (!_core()) {
|
||||
PWRN("not entitled to bin thread");
|
||||
return;
|
||||
}
|
||||
/* lookup thread */
|
||||
Thread * const thread = Thread::pool()->object(user_arg_1());
|
||||
if (!thread) {
|
||||
PWRN("failed to lookup thread");
|
||||
return;
|
||||
}
|
||||
/* destroy thread */
|
||||
thread->~Thread();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user