mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
parent
973fbc98be
commit
61d798c629
@ -22,7 +22,6 @@
|
|||||||
#include <util/xml_node.h>
|
#include <util/xml_node.h>
|
||||||
#include <base/allocator.h>
|
#include <base/allocator.h>
|
||||||
#include <base/service.h>
|
#include <base/service.h>
|
||||||
#include <base/lock.h>
|
|
||||||
#include <base/child.h>
|
#include <base/child.h>
|
||||||
#include <timer_session/timer_session.h>
|
#include <timer_session/timer_session.h>
|
||||||
#include <pd_session/client.h>
|
#include <pd_session/client.h>
|
||||||
@ -229,7 +228,7 @@ class Launchpad
|
|||||||
Launchpad_child::Parent_services _parent_services { };
|
Launchpad_child::Parent_services _parent_services { };
|
||||||
Launchpad_child::Child_services _child_services { };
|
Launchpad_child::Child_services _child_services { };
|
||||||
|
|
||||||
Genode::Lock _children_lock { };
|
Genode::Mutex _children_mutex { };
|
||||||
Genode::List<Launchpad_child> _children { };
|
Genode::List<Launchpad_child> _children { };
|
||||||
|
|
||||||
bool _child_name_exists(Launchpad_child::Name const &);
|
bool _child_name_exists(Launchpad_child::Name const &);
|
||||||
|
@ -72,7 +72,7 @@ bool Launchpad::_child_name_exists(Launchpad_child::Name const &name)
|
|||||||
Launchpad_child::Name
|
Launchpad_child::Name
|
||||||
Launchpad::_get_unique_child_name(Launchpad_child::Name const &binary_name)
|
Launchpad::_get_unique_child_name(Launchpad_child::Name const &binary_name)
|
||||||
{
|
{
|
||||||
Lock::Guard lock_guard(_children_lock);
|
Mutex::Guard guard(_children_mutex);
|
||||||
|
|
||||||
if (!_child_name_exists(binary_name))
|
if (!_child_name_exists(binary_name))
|
||||||
return binary_name;
|
return binary_name;
|
||||||
@ -195,7 +195,7 @@ Launchpad_child *Launchpad::start_child(Launchpad_child::Name const &binary_name
|
|||||||
cap_quota, ram_quota,
|
cap_quota, ram_quota,
|
||||||
_parent_services, _child_services, config_ds);
|
_parent_services, _child_services, config_ds);
|
||||||
|
|
||||||
Lock::Guard lock_guard(_children_lock);
|
Mutex::Guard guard(_children_mutex);
|
||||||
_children.insert(c);
|
_children.insert(c);
|
||||||
|
|
||||||
add_child(unique_name, ram_quota.value, *c, _heap);
|
add_child(unique_name, ram_quota.value, *c, _heap);
|
||||||
@ -212,7 +212,7 @@ void Launchpad::exit_child(Launchpad_child &child)
|
|||||||
{
|
{
|
||||||
remove_child(child.name(), _heap);
|
remove_child(child.name(), _heap);
|
||||||
|
|
||||||
Lock::Guard lock_guard(_children_lock);
|
Mutex::Guard guard(_children_mutex);
|
||||||
_children.remove(&child);
|
_children.remove(&child);
|
||||||
|
|
||||||
destroy(_sliced_heap, &child);
|
destroy(_sliced_heap, &child);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user