mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 03:55:26 +00:00
base: remove Genode::parent_cap from the API
Components interact with their environments using the Genode::Env class instead of directly using the parent capability.
This commit is contained in:
parent
695ac957f4
commit
0d74435448
@ -32,18 +32,20 @@ namespace Genode {
|
||||
|
||||
struct Env;
|
||||
|
||||
extern Env *env();
|
||||
|
||||
/**
|
||||
* Return parent capability
|
||||
*
|
||||
* Platforms have to implement this function for environment
|
||||
* initialization.
|
||||
* Return the interface to the component's environment
|
||||
*/
|
||||
Parent_capability parent_cap();
|
||||
extern Env *env();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Component runtime environment
|
||||
*
|
||||
* The environment of a Genode component is defined by its parent. The 'Env'
|
||||
* class allows the component to interact with its environment. It is
|
||||
* initialized at the startup of the component.
|
||||
*/
|
||||
struct Genode::Env
|
||||
{
|
||||
virtual ~Env() { }
|
||||
@ -54,35 +56,35 @@ struct Genode::Env
|
||||
virtual Parent *parent() = 0;
|
||||
|
||||
/**
|
||||
* RAM session for the program
|
||||
* RAM session of the component
|
||||
*
|
||||
* The RAM Session represents a quota of memory that is
|
||||
* available to the program. Quota can be used to allocate
|
||||
* RAM-Dataspaces.
|
||||
* The RAM Session represents a budget of memory (quota) that is
|
||||
* available to the component. This budget can be used to allocate
|
||||
* RAM dataspaces.
|
||||
*/
|
||||
virtual Ram_session *ram_session() = 0;
|
||||
virtual Ram_session_capability ram_session_cap() = 0;
|
||||
|
||||
/**
|
||||
* CPU session for the program
|
||||
* CPU session of the component
|
||||
*
|
||||
* This session is used to create threads.
|
||||
* This session is used to create the threads of the component.
|
||||
*/
|
||||
virtual Cpu_session *cpu_session() = 0;
|
||||
virtual Cpu_session_capability cpu_session_cap() = 0;
|
||||
|
||||
/**
|
||||
* Region manager session of the program
|
||||
* Region-manager session of the component as created by the parent
|
||||
*/
|
||||
virtual Rm_session *rm_session() = 0;
|
||||
|
||||
/**
|
||||
* Pd session of the program
|
||||
* PD session of the component as created by the parent
|
||||
*/
|
||||
virtual Pd_session *pd_session() = 0;
|
||||
|
||||
/**
|
||||
* Heap backed by the ram_session of the environment.
|
||||
* Heap backed by the RAM session of the environment
|
||||
*/
|
||||
virtual Allocator *heap() = 0;
|
||||
};
|
||||
|
@ -25,10 +25,13 @@
|
||||
#include <pd_session/client.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
class Expanding_rm_session_client;
|
||||
class Expanding_ram_session_client;
|
||||
class Expanding_cpu_session_client;
|
||||
class Expanding_parent_client;
|
||||
|
||||
Parent_capability parent_cap();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user