mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-30 16:14:13 +00:00
parent
d7bbb27671
commit
458206b11a
@ -140,7 +140,8 @@ class Genode::Sandbox::Local_service_base : public Service
|
|||||||
resources(session_resources_from_args(session.args().string())),
|
resources(session_resources_from_args(session.args().string())),
|
||||||
label(session.label()),
|
label(session.label()),
|
||||||
diag(session_diag_from_args(session.args().string())),
|
diag(session_diag_from_args(session.args().string())),
|
||||||
args(session.args())
|
args(session.args()),
|
||||||
|
affinity(session.affinity())
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -157,6 +158,7 @@ class Genode::Sandbox::Local_service_base : public Service
|
|||||||
Session::Label const label;
|
Session::Label const label;
|
||||||
Session::Diag const diag;
|
Session::Diag const diag;
|
||||||
Args const args;
|
Args const args;
|
||||||
|
Affinity const affinity;
|
||||||
|
|
||||||
template <typename ST>
|
template <typename ST>
|
||||||
void deliver_session(ST &session)
|
void deliver_session(ST &session)
|
||||||
|
@ -55,12 +55,14 @@ install_config {
|
|||||||
<service name="Terminal"/>
|
<service name="Terminal"/>
|
||||||
</parent-provides>
|
</parent-provides>
|
||||||
<default caps="100"/>
|
<default caps="100"/>
|
||||||
|
<affinity-space width="2" height="1"/>
|
||||||
|
|
||||||
<monitor>
|
<monitor>
|
||||||
<policy label="test-monitor" stop="no" wx="yes" />
|
<policy label="test-monitor" stop="no" wx="yes" />
|
||||||
</monitor>
|
</monitor>
|
||||||
|
|
||||||
<start name="test-monitor">
|
<start name="test-monitor">
|
||||||
|
<affinity xpos="1" width="1"/>
|
||||||
<resource name="RAM" quantum="32M"/>
|
<resource name="RAM" quantum="32M"/>
|
||||||
<route>
|
<route>
|
||||||
<service name="PD"> <local/> </service>
|
<service name="PD"> <local/> </service>
|
||||||
@ -75,6 +77,6 @@ install_config {
|
|||||||
|
|
||||||
build_boot_image [build_artifacts]
|
build_boot_image [build_artifacts]
|
||||||
|
|
||||||
append qemu_args "-nographic "
|
append qemu_args "-nographic -smp 4,cores=4 "
|
||||||
|
|
||||||
run_genode_until {\[init -> monitor\] child "test-monitor" exited with exit value 0.*\n} 30
|
run_genode_until {\[init -> monitor\] child "test-monitor" exited with exit value 0.*\n} 30
|
||||||
|
@ -60,10 +60,10 @@ struct Monitor::Main : Sandbox::State_handler,
|
|||||||
struct Local_cpu_session : Connection<Cpu_connection>, Inferior_cpu
|
struct Local_cpu_session : Connection<Cpu_connection>, Inferior_cpu
|
||||||
{
|
{
|
||||||
Local_cpu_session(Env &env, Session::Label const &label,
|
Local_cpu_session(Env &env, Session::Label const &label,
|
||||||
Priority priority, Allocator &alloc,
|
Affinity affinity, Priority priority, Allocator &alloc,
|
||||||
Thread_monitor &thread_monitor)
|
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,
|
Inferior_cpu(env.ep(), _connection.cap(), label, alloc,
|
||||||
thread_monitor)
|
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 &_create_session(Cpu_service &, Session_request const &request)
|
||||||
{
|
{
|
||||||
Local_cpu_session &session = *new (_heap)
|
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);
|
_priority_from_args(request.args), _heap, *this);
|
||||||
|
|
||||||
session.init_native_cpu(_kernel);
|
session.init_native_cpu(_kernel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user