monitor: apply affinity to monitored children

Fixes #4996
This commit is contained in:
Norman Feske
2023-09-12 15:27:17 +02:00
committed by Christian Helmuth
parent d7bbb27671
commit 458206b11a
3 changed files with 9 additions and 5 deletions

View File

@ -60,10 +60,10 @@ struct Monitor::Main : Sandbox::State_handler,
struct Local_cpu_session : Connection<Cpu_connection>, Inferior_cpu
{
Local_cpu_session(Env &env, Session::Label const &label,
Priority priority, Allocator &alloc,
Affinity affinity, Priority priority, Allocator &alloc,
Thread_monitor &thread_monitor)
:
Connection<Cpu_connection>(env, label, priority.value),
Connection<Cpu_connection>(env, label, priority.value, affinity),
Inferior_cpu(env.ep(), _connection.cap(), label, alloc,
thread_monitor)
{ }
@ -278,7 +278,7 @@ struct Monitor::Main : Sandbox::State_handler,
Local_cpu_session &_create_session(Cpu_service &, Session_request const &request)
{
Local_cpu_session &session = *new (_heap)
Local_cpu_session(_env, request.label,
Local_cpu_session(_env, request.label, request.affinity,
_priority_from_args(request.args), _heap, *this);
session.init_native_cpu(_kernel);