genode/repos/base-linux/src/include/base/internal/local_parent.h
Norman Feske cfdbccc5c2 Remove blocking calls from root and parent RPCs
This is a redesign of the root and parent interfaces to eliminate
blocking RPC calls.

- New session representation at the parent (base/session_state.h)
- base-internal root proxy mechanism as migration path
- Redesign of base/service.h
- Removes ancient 'Connection::KEEP_OPEN' feature
- Interface change of 'Child', 'Child_policy', 'Slave', 'Slave_policy'
- New 'Slave::Connection'
- Changed child-construction procedure to be compatible with the
  non-blocking parent interface and to be easier to use
- The child's initial LOG session, its binary ROM session, and the
  linker ROM session have become part of the child's envirenment.
- Session upgrading must now be performed via 'env.upgrade' instead
  of performing a sole RPC call the parent. To make RAM upgrades
  easier, the 'Connection' provides a new 'upgrade_ram' method.

Issue #2120
2016-11-25 16:06:42 +01:00

74 lines
1.9 KiB
C++

/*
* \brief Component-local implementation of the parent interface
* \author Norman Feske
* \date 2016-04-29
*
* On Linux, we intercept the parent interface to implement services that are
* concerned with virtual-memory management locally within the component.
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__INTERNAL__LOCAL_PARENT_H_
#define _INCLUDE__BASE__INTERNAL__LOCAL_PARENT_H_
/* Genode includes */
#include <base/allocator.h>
/* base-internal includes */
#include <base/internal/expanding_parent_client.h>
namespace Genode {
class Local_session;
class Local_parent;
}
/**
* Local interceptor of parent requests
*
* On Linux, we need to intercept calls to the parent interface to implement
* the RM service locally. This particular service is used for creating managed
* dataspaces, which allow the reservation of parts of the local address space
* from being automatically managed by the 'env()->rm_session()'.
*
* All requests that do not refer to the RM service are passed through the real
* parent interface.
*/
class Genode::Local_parent : public Expanding_parent_client
{
private:
Allocator &_alloc;
Id_space<Client> _local_sessions_id_space;
public:
/**********************
** Parent interface **
**********************/
Session_capability session(Client::Id, Service_name const &, Session_args const &,
Affinity const & = Affinity()) override;
Close_result close(Client::Id) override;
/**
* Constructor
*
* \param parent_cap real parent capability used to
* promote requests to non-local
* services
*/
Local_parent(Parent_capability parent_cap,
Emergency_ram_reserve &,
Allocator &);
};
#endif /* _INCLUDE__BASE__INTERNAL__LOCAL_PARENT_H_ */