mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-13 22:23:45 +00:00
linux: destroy native CPU client after thread start
The native CPU client holds a capability reference and the reference counter of the capability can reach its limit when many threads are successively created and destroyed (destroyed by the Linux kernel). Fixes #2886
This commit is contained in:
parent
25b47758b7
commit
2f7e421eed
@ -68,8 +68,10 @@ void Thread::_thread_start()
|
||||
lx_sigaction(LX_SIGUSR1, empty_signal_handler, false);
|
||||
|
||||
/* inform core about the new thread and process ID of the new thread */
|
||||
Linux_native_cpu_client native_cpu(thread->_cpu_session->native_cpu());
|
||||
native_cpu.thread_id(thread->cap(), thread->native_thread().pid, thread->native_thread().tid);
|
||||
{
|
||||
Linux_native_cpu_client native_cpu(thread->_cpu_session->native_cpu());
|
||||
native_cpu.thread_id(thread->cap(), thread->native_thread().pid, thread->native_thread().tid);
|
||||
}
|
||||
|
||||
/* wakeup 'start' function */
|
||||
startup_lock().unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user