mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
base: pass separate label to Local_connection
This patch extends the constructor of 'Local_connection' with an optional 'label' argument, which was previously passed implicitly as part of the 'args' argument. Keeping the label separate from 'args' enables us to distinguish the client-specified label from a label that resulted from a server-side label as it is used when rewriting a label of an environment session (i.e., the binary name) in init's routing policy. In principle, this patch eliminates the need for init's explicite handling of the binary name via the '<binary>' node, or at least allows us to simplity the binary-node handling.
This commit is contained in:
parent
39e409f756
commit
48174ab974
@ -523,7 +523,8 @@ class Genode::Child : protected Rpc_object<Parent>,
|
|||||||
|
|
||||||
_env_service.construct(_child, route.service);
|
_env_service.construct(_child, route.service);
|
||||||
_connection.construct(*_env_service, _child._id_space, _client_id,
|
_connection.construct(*_env_service, _child._id_space, _client_id,
|
||||||
_args, _child._policy.filter_session_affinity(Affinity()));
|
_args, _child._policy.filter_session_affinity(Affinity()),
|
||||||
|
route.label);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename CONNECTION::Session_type SESSION;
|
typedef typename CONNECTION::Session_type SESSION;
|
||||||
|
@ -54,16 +54,16 @@ struct Genode::Local_connection_base : Noncopyable
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Local_connection_base(Service &service,
|
Local_connection_base(Service &service,
|
||||||
Id_space<Parent::Client> &id_space,
|
Id_space<Parent::Client> &id_space,
|
||||||
Parent::Client::Id id,
|
Parent::Client::Id id,
|
||||||
Args const &args, Affinity const &affinity,
|
Args const &args, Affinity const &affinity,
|
||||||
size_t ram_quota)
|
Session_label const &label,
|
||||||
|
size_t ram_quota)
|
||||||
{
|
{
|
||||||
enum { NUM_ATTEMPTS = 10 };
|
enum { NUM_ATTEMPTS = 10 };
|
||||||
for (unsigned i = 0; i < NUM_ATTEMPTS; i++) {
|
for (unsigned i = 0; i < NUM_ATTEMPTS; i++) {
|
||||||
_session_state.construct(service, id_space, id,
|
_session_state.construct(service, id_space, id, label,
|
||||||
label_from_args(args.string()),
|
|
||||||
_init_args(args, ram_quota), affinity);
|
_init_args(args, ram_quota), affinity);
|
||||||
|
|
||||||
_session_state->service().initiate_request(*_session_state);
|
_session_state->service().initiate_request(*_session_state);
|
||||||
@ -137,10 +137,12 @@ class Genode::Local_connection : Local_connection_base
|
|||||||
|
|
||||||
Local_connection(Service &service, Id_space<Parent::Client> &id_space,
|
Local_connection(Service &service, Id_space<Parent::Client> &id_space,
|
||||||
Parent::Client::Id id, Args const &args,
|
Parent::Client::Id id, Args const &args,
|
||||||
Affinity const &affinity)
|
Affinity const &affinity,
|
||||||
|
Session_label const &label = Session_label())
|
||||||
:
|
:
|
||||||
Local_connection_base(service, id_space, id, args,
|
Local_connection_base(service, id_space, id, args, affinity,
|
||||||
affinity, CONNECTION::RAM_QUOTA)
|
label.valid() ? label : label_from_args(args.string()),
|
||||||
|
CONNECTION::RAM_QUOTA)
|
||||||
{
|
{
|
||||||
service.wakeup();
|
service.wakeup();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user