mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-22 10:21:04 +00:00
core: improve coding-style consistency
This commit is contained in:
parent
5bdc88bf57
commit
c10904967b
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_object; class Irq_args; }
|
namespace Genode { class Irq_object; class Irq_args; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Irq_object
|
class Genode::Irq_object
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -29,16 +29,18 @@
|
|||||||
#include <ipc_pager.h>
|
#include <ipc_pager.h>
|
||||||
#include <rpc_cap_factory.h>
|
#include <rpc_cap_factory.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
typedef Cpu_session::Thread_creation_failed Invalid_thread;
|
typedef Cpu_session::Thread_creation_failed Invalid_thread;
|
||||||
|
|
||||||
class Pager_entrypoint;
|
class Pager_entrypoint;
|
||||||
class Pager_object;
|
class Pager_object;
|
||||||
|
class Exception_handlers;
|
||||||
|
}
|
||||||
|
|
||||||
class Exception_handlers
|
|
||||||
{
|
class Genode::Exception_handlers
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template <uint8_t EV>
|
template <uint8_t EV>
|
||||||
@ -51,11 +53,11 @@ namespace Genode {
|
|||||||
template <uint8_t EV>
|
template <uint8_t EV>
|
||||||
void register_handler(Pager_object &, Nova::Mtd,
|
void register_handler(Pager_object &, Nova::Mtd,
|
||||||
void (__attribute__((regparm(1)))*)(Pager_object &) = nullptr);
|
void (__attribute__((regparm(1)))*)(Pager_object &) = nullptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Pager_object : public Object_pool<Pager_object>::Entry
|
class Genode::Pager_object : public Object_pool<Pager_object>::Entry
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
unsigned long _badge; /* used for debugging */
|
unsigned long _badge; /* used for debugging */
|
||||||
@ -370,16 +372,17 @@ namespace Genode {
|
|||||||
char const * dst_thread = "unknown");
|
char const * dst_thread = "unknown");
|
||||||
|
|
||||||
void print(Output &out) const;
|
void print(Output &out) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Paging entry point
|
* Paging entry point
|
||||||
*
|
*
|
||||||
* For a paging entry point can hold only one activation. So, paging is
|
* For a paging entry point can hold only one activation. So, paging is
|
||||||
* strictly serialized for one entry point.
|
* strictly serialized for one entry point.
|
||||||
*/
|
*/
|
||||||
class Pager_entrypoint : public Object_pool<Pager_object>
|
class Genode::Pager_entrypoint : public Object_pool<Pager_object>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -401,7 +404,6 @@ namespace Genode {
|
|||||||
* Dissolve Pager_object from entry point
|
* Dissolve Pager_object from entry point
|
||||||
*/
|
*/
|
||||||
void dissolve(Pager_object &obj);
|
void dissolve(Pager_object &obj);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PAGER_H_ */
|
#endif /* _CORE__INCLUDE__PAGER_H_ */
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#include <core_mem_alloc.h>
|
#include <core_mem_alloc.h>
|
||||||
#include <address_space.h>
|
#include <address_space.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Platform; }
|
||||||
|
|
||||||
class Platform : public Platform_generic
|
|
||||||
{
|
class Genode::Platform : public Platform_generic
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum { MAX_SUPPORTED_CPUS = 64};
|
enum { MAX_SUPPORTED_CPUS = 64};
|
||||||
@ -140,7 +141,6 @@ namespace Genode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_H_ */
|
#endif /* _CORE__INCLUDE__PLATFORM_H_ */
|
||||||
|
@ -18,12 +18,15 @@
|
|||||||
#include <platform_thread.h>
|
#include <platform_thread.h>
|
||||||
#include <address_space.h>
|
#include <address_space.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
class Platform_thread;
|
class Platform_thread;
|
||||||
class Platform_pd : public Address_space
|
class Platform_pd;
|
||||||
{
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Genode::Platform_pd : public Address_space
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Native_capability _parent { };
|
Native_capability _parent { };
|
||||||
@ -91,7 +94,6 @@ namespace Genode {
|
|||||||
*****************************/
|
*****************************/
|
||||||
|
|
||||||
void flush(addr_t, size_t, Core_local_addr) override;
|
void flush(addr_t, size_t, Core_local_addr) override;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */
|
#endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */
|
||||||
|
@ -31,8 +31,12 @@
|
|||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
class Platform_pd;
|
class Platform_pd;
|
||||||
class Platform_thread
|
class Platform_thread;
|
||||||
{
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Genode::Platform_thread
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Platform_pd *_pd;
|
Platform_pd *_pd;
|
||||||
@ -219,7 +223,6 @@ namespace Genode {
|
|||||||
* Return execution time consumed by the thread
|
* Return execution time consumed by the thread
|
||||||
*/
|
*/
|
||||||
Trace::Execution_time execution_time() const;
|
Trace::Execution_time execution_time() const;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */
|
#endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Vm_session_component; }
|
namespace Genode { class Vm_session_component; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Vm_session_component
|
class Genode::Vm_session_component
|
||||||
:
|
:
|
||||||
private Ram_quota_guard,
|
private Ram_quota_guard,
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_object; }
|
namespace Genode { class Irq_object; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Irq_object : public Thread {
|
class Genode::Irq_object : public Thread {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Page_table_registry; }
|
namespace Genode { class Page_table_registry; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Page_table_registry
|
class Genode::Page_table_registry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Rpc_cap_factory; }
|
namespace Genode { class Rpc_cap_factory; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Rpc_cap_factory
|
class Genode::Rpc_cap_factory
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -27,8 +27,19 @@
|
|||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
struct Thread_info
|
struct Thread_info;
|
||||||
{
|
|
||||||
|
/**
|
||||||
|
* Set register values for the instruction pointer and stack pointer and
|
||||||
|
* start the seL4 thread
|
||||||
|
*/
|
||||||
|
void start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu);
|
||||||
|
void affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct Genode::Thread_info
|
||||||
|
{
|
||||||
Cap_sel tcb_sel { 0 };
|
Cap_sel tcb_sel { 0 };
|
||||||
Cap_sel ep_sel { 0 };
|
Cap_sel ep_sel { 0 };
|
||||||
Cap_sel lock_sel { 0 };
|
Cap_sel lock_sel { 0 };
|
||||||
@ -47,16 +58,9 @@ namespace Genode {
|
|||||||
inline void destruct();
|
inline void destruct();
|
||||||
|
|
||||||
bool init_vcpu(Platform &, Cap_sel ept);
|
bool init_vcpu(Platform &, Cap_sel ept);
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set register values for the instruction pointer and stack pointer and
|
|
||||||
* start the seL4 thread
|
|
||||||
*/
|
|
||||||
void start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu);
|
|
||||||
void affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void Genode::Thread_info::init_tcb(Platform &platform,
|
void Genode::Thread_info::init_tcb(Platform &platform,
|
||||||
Range_allocator &phys_alloc,
|
Range_allocator &phys_alloc,
|
||||||
unsigned const prio, unsigned const cpu)
|
unsigned const prio, unsigned const cpu)
|
||||||
@ -76,6 +80,7 @@ void Genode::Thread_info::init_tcb(Platform &platform,
|
|||||||
affinity_sel4_thread(tcb_sel, cpu);
|
affinity_sel4_thread(tcb_sel, cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Genode::Thread_info::init(addr_t const utcb_virt_addr, unsigned const prio)
|
void Genode::Thread_info::init(addr_t const utcb_virt_addr, unsigned const prio)
|
||||||
{
|
{
|
||||||
Platform &platform = platform_specific();
|
Platform &platform = platform_specific();
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
namespace Genode { struct Untyped_memory; }
|
namespace Genode { struct Untyped_memory; }
|
||||||
|
|
||||||
|
|
||||||
struct Genode::Untyped_memory
|
struct Genode::Untyped_memory
|
||||||
{
|
{
|
||||||
class Phys_alloc_failed : Exception { };
|
class Phys_alloc_failed : Exception { };
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Vm_session_component; }
|
namespace Genode { class Vm_session_component; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Vm_session_component
|
class Genode::Vm_session_component
|
||||||
:
|
:
|
||||||
private Ram_quota_guard,
|
private Ram_quota_guard,
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
namespace Genode { struct Address_space; }
|
namespace Genode { struct Address_space; }
|
||||||
|
|
||||||
|
|
||||||
struct Genode::Address_space : private Weak_object<Address_space>,
|
struct Genode::Address_space : private Weak_object<Address_space>,
|
||||||
public Interface
|
public Interface
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
namespace Genode { struct Boot_modules_header; }
|
namespace Genode { struct Boot_modules_header; }
|
||||||
|
|
||||||
|
|
||||||
struct Genode::Boot_modules_header
|
struct Genode::Boot_modules_header
|
||||||
{
|
{
|
||||||
long name; /* physical address of null-terminated string */
|
long name; /* physical address of null-terminated string */
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Constrained_core_ram; }
|
namespace Genode { class Constrained_core_ram; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Constrained_core_ram : public Allocator
|
class Genode::Constrained_core_ram : public Allocator
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <util/string.h>
|
#include <util/string.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
struct Core_log;
|
struct Core_log;
|
||||||
|
|
||||||
struct Core_log_range {
|
struct Core_log_range {
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
/* Core includes */
|
/* Core includes */
|
||||||
#include <cpu_session_component.h>
|
#include <cpu_session_component.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Cpu_root; }
|
||||||
|
|
||||||
class Cpu_root : public Root_component<Cpu_session_component>
|
|
||||||
{
|
class Genode::Cpu_root : public Root_component<Cpu_session_component>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Ram_allocator &_ram_alloc;
|
Ram_allocator &_ram_alloc;
|
||||||
@ -84,7 +85,6 @@ namespace Genode {
|
|||||||
_thread_ep(thread_ep), _pager_ep(pager_ep),
|
_thread_ep(thread_ep), _pager_ep(pager_ep),
|
||||||
_trace_sources(trace_sources)
|
_trace_sources(trace_sources)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__CPU_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__CPU_ROOT_H_ */
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/page_size.h>
|
#include <base/internal/page_size.h>
|
||||||
|
|
||||||
namespace Genode
|
namespace Genode {
|
||||||
{
|
|
||||||
class Cpu_thread_component;
|
class Cpu_thread_component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,14 +26,17 @@
|
|||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
class Rm_region;
|
class Rm_region;
|
||||||
|
class Dataspace_component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deriving classes can own a dataspace to implement conditional behavior
|
* Deriving classes can own a dataspace to implement conditional behavior
|
||||||
*/
|
*/
|
||||||
class Dataspace_owner : Interface { };
|
class Dataspace_owner : Interface { };
|
||||||
|
}
|
||||||
|
|
||||||
class Dataspace_component : public Rpc_object<Dataspace>
|
|
||||||
{
|
class Genode::Dataspace_component : public Rpc_object<Dataspace>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
addr_t const _phys_addr = 0; /* address of dataspace in physical memory */
|
addr_t const _phys_addr = 0; /* address of dataspace in physical memory */
|
||||||
@ -158,7 +161,6 @@ namespace Genode {
|
|||||||
|
|
||||||
size_t size() override { return _size; }
|
size_t size() override { return _size; }
|
||||||
bool writeable() override { return _writeable; }
|
bool writeable() override { return _writeable; }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__DATASPACE_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__DATASPACE_COMPONENT_H_ */
|
||||||
|
@ -18,10 +18,11 @@
|
|||||||
|
|
||||||
#include "io_mem_session_component.h"
|
#include "io_mem_session_component.h"
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Io_mem_root; }
|
||||||
|
|
||||||
class Io_mem_root : public Root_component<Io_mem_session_component>
|
|
||||||
{
|
class Genode::Io_mem_root : public Root_component<Io_mem_session_component>
|
||||||
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -57,7 +58,6 @@ namespace Genode {
|
|||||||
:
|
:
|
||||||
Root_component<Io_mem_session_component>(&session_ep, &md_alloc),
|
Root_component<Io_mem_session_component>(&session_ep, &md_alloc),
|
||||||
_io_mem_alloc(io_mem_alloc), _ram_alloc(ram_alloc), _ds_ep(ds_ep) { }
|
_io_mem_alloc(io_mem_alloc), _ram_alloc(ram_alloc), _ds_ep(ds_ep) { }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__IO_MEM_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__IO_MEM_ROOT_H_ */
|
||||||
|
@ -22,10 +22,11 @@
|
|||||||
/* core includes */
|
/* core includes */
|
||||||
#include <dataspace_component.h>
|
#include <dataspace_component.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Io_mem_session_component; }
|
||||||
|
|
||||||
class Io_mem_session_component : public Rpc_object<Io_mem_session>
|
|
||||||
{
|
class Genode::Io_mem_session_component : public Rpc_object<Io_mem_session>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -143,7 +144,6 @@ namespace Genode {
|
|||||||
******************************/
|
******************************/
|
||||||
|
|
||||||
Io_mem_dataspace_capability dataspace() override { return _ds_cap; }
|
Io_mem_dataspace_capability dataspace() override { return _ds_cap; }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__IO_MEM_SESSION_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__IO_MEM_SESSION_COMPONENT_H_ */
|
||||||
|
@ -19,9 +19,13 @@
|
|||||||
#include "io_port_session_component.h"
|
#include "io_port_session_component.h"
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
class Io_port_handler;
|
||||||
|
class Io_port_root;
|
||||||
|
}
|
||||||
|
|
||||||
struct Io_port_handler
|
|
||||||
{
|
class Genode::Io_port_handler
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum { STACK_SIZE = 4096 };
|
enum { STACK_SIZE = 4096 };
|
||||||
@ -34,11 +38,12 @@ namespace Genode {
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
Rpc_entrypoint &entrypoint() { return _ep; }
|
Rpc_entrypoint &entrypoint() { return _ep; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Io_port_root : private Io_port_handler,
|
|
||||||
|
class Genode::Io_port_root : private Io_port_handler,
|
||||||
public Root_component<Io_port_session_component>
|
public Root_component<Io_port_session_component>
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -65,7 +70,6 @@ namespace Genode {
|
|||||||
Io_port_handler(pd_session),
|
Io_port_handler(pd_session),
|
||||||
Root_component<Io_port_session_component>(&entrypoint(), &md_alloc),
|
Root_component<Io_port_session_component>(&entrypoint(), &md_alloc),
|
||||||
_io_port_alloc(io_port_alloc) { }
|
_io_port_alloc(io_port_alloc) { }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__IO_PORT_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__IO_PORT_ROOT_H_ */
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* \author Christian Helmuth
|
* \author Christian Helmuth
|
||||||
* \date 2007-04-17
|
* \date 2007-04-17
|
||||||
*
|
*
|
||||||
* We assume Core is running on IOPL3.
|
* We assume core is running on IOPL3.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -24,10 +24,11 @@
|
|||||||
/* core includes */
|
/* core includes */
|
||||||
#include <dataspace_component.h>
|
#include <dataspace_component.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Io_port_session_component; }
|
||||||
|
|
||||||
class Io_port_session_component : public Rpc_object<Io_port_session>
|
|
||||||
{
|
class Genode::Io_port_session_component : public Rpc_object<Io_port_session>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Range_allocator &_io_port_alloc;
|
Range_allocator &_io_port_alloc;
|
||||||
@ -70,7 +71,6 @@ namespace Genode {
|
|||||||
void outb(unsigned short, unsigned char) override;
|
void outb(unsigned short, unsigned char) override;
|
||||||
void outw(unsigned short, unsigned short) override;
|
void outw(unsigned short, unsigned short) override;
|
||||||
void outl(unsigned short, unsigned) override;
|
void outl(unsigned short, unsigned) override;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__IO_PORT_SESSION_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__IO_PORT_SESSION_COMPONENT_H_ */
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_args; }
|
namespace Genode { class Irq_args; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Irq_args
|
class Genode::Irq_args
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -18,8 +18,9 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_object; }
|
namespace Genode { class Irq_object; }
|
||||||
|
|
||||||
class Genode::Irq_object : public Thread {
|
|
||||||
|
|
||||||
|
class Genode::Irq_object : public Thread
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Signal_context_capability _sig_cap { };
|
Signal_context_capability _sig_cap { };
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_root; }
|
namespace Genode { class Irq_root; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Irq_root : public Root_component<Irq_session_component>
|
class Genode::Irq_root : public Root_component<Irq_session_component>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Irq_session_component; }
|
namespace Genode { class Irq_session_component; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Irq_session_component : public Rpc_object<Irq_session>,
|
class Genode::Irq_session_component : public Rpc_object<Irq_session>,
|
||||||
private List<Irq_session_component>::Element
|
private List<Irq_session_component>::Element
|
||||||
{
|
{
|
||||||
|
@ -19,10 +19,11 @@
|
|||||||
|
|
||||||
#include "log_session_component.h"
|
#include "log_session_component.h"
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Log_root; }
|
||||||
|
|
||||||
class Log_root : public Root_component<Log_session_component>
|
|
||||||
{
|
class Genode::Log_root : public Root_component<Log_session_component>
|
||||||
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +46,6 @@ namespace Genode {
|
|||||||
:
|
:
|
||||||
Root_component<Log_session_component>(&session_ep, &md_alloc)
|
Root_component<Log_session_component>(&session_ep, &md_alloc)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__LOG_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__LOG_ROOT_H_ */
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#include <base/session_label.h>
|
#include <base/session_label.h>
|
||||||
#include <log_session/log_session.h>
|
#include <log_session/log_session.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Log_session_component; }
|
||||||
|
|
||||||
class Log_session_component : public Rpc_object<Log_session>
|
|
||||||
{
|
class Genode::Log_session_component : public Rpc_object<Log_session>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Session_label const _label;
|
Session_label const _label;
|
||||||
@ -71,7 +72,6 @@ namespace Genode {
|
|||||||
if (from_i < len)
|
if (from_i < len)
|
||||||
log(_label, Cstring(string + from_i));
|
log(_label, Cstring(string + from_i));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_ */
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
/* Core */
|
/* Core */
|
||||||
#include <pd_session_component.h>
|
#include <pd_session_component.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Pd_root; }
|
||||||
class Pd_root;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class Genode::Pd_root : public Genode::Root_component<Genode::Pd_session_component>
|
class Genode::Pd_root : public Genode::Root_component<Genode::Pd_session_component>
|
||||||
|
@ -24,11 +24,26 @@
|
|||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
|
class Platform_generic;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic platform interface
|
* Request pointer to static generic platform interface of core
|
||||||
*/
|
*/
|
||||||
class Platform_generic
|
extern Platform_generic &platform();
|
||||||
{
|
|
||||||
|
class Platform;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the platform-specific platform interface of core
|
||||||
|
*
|
||||||
|
* This function should only be called from platform-specific code.
|
||||||
|
*/
|
||||||
|
extern Platform &platform_specific();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Genode::Platform_generic
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~Platform_generic() { }
|
virtual ~Platform_generic() { }
|
||||||
@ -103,22 +118,7 @@ namespace Genode {
|
|||||||
* Return true if the core component relies on a 'Platform_pd' object
|
* Return true if the core component relies on a 'Platform_pd' object
|
||||||
*/
|
*/
|
||||||
virtual bool core_needs_platform_pd() const { return true; }
|
virtual bool core_needs_platform_pd() const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request pointer to static generic platform interface of core
|
|
||||||
*/
|
|
||||||
extern Platform_generic &platform();
|
|
||||||
|
|
||||||
class Platform;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Access the platform-specific platform interface of core
|
|
||||||
*
|
|
||||||
* This function should only be called from platform-specific code.
|
|
||||||
*/
|
|
||||||
extern Platform &platform_specific();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_GENERIC_H_ */
|
#endif /* _CORE__INCLUDE__PLATFORM_GENERIC_H_ */
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include <base/internal/stack_area.h>
|
#include <base/internal/stack_area.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
class Cpu_thread_component;
|
class Cpu_thread_component;
|
||||||
class Dataspace_component;
|
class Dataspace_component;
|
||||||
class Region_map_component;
|
class Region_map_component;
|
||||||
@ -51,6 +50,7 @@ namespace Genode {
|
|||||||
class Rm_session_component;
|
class Rm_session_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Genode::Region_map_detach : Genode::Interface
|
class Genode::Region_map_detach : Genode::Interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
#include <root/component.h>
|
#include <root/component.h>
|
||||||
#include "rom_session_component.h"
|
#include "rom_session_component.h"
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Rom_root; }
|
||||||
|
|
||||||
class Rom_root : public Root_component<Rom_session_component>
|
|
||||||
{
|
|
||||||
|
|
||||||
|
class Genode::Rom_root : public Root_component<Rom_session_component>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Rom_fs &_rom_fs; /* rom file system */
|
Rom_fs &_rom_fs; /* rom file system */
|
||||||
@ -49,7 +49,6 @@ namespace Genode {
|
|||||||
:
|
:
|
||||||
Root_component<Rom_session_component>(&session_ep, &md_alloc),
|
Root_component<Rom_session_component>(&session_ep, &md_alloc),
|
||||||
_rom_fs(rom_fs), _ds_ep(ds_ep) { }
|
_rom_fs(rom_fs), _ds_ep(ds_ep) { }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__ROM_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__ROM_ROOT_H_ */
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#include <rom_session/rom_session.h>
|
#include <rom_session/rom_session.h>
|
||||||
#include <base/session_label.h>
|
#include <base/session_label.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode { class Rom_session_component; }
|
||||||
|
|
||||||
class Rom_session_component : public Rpc_object<Rom_session>
|
|
||||||
{
|
class Genode::Rom_session_component : public Rpc_object<Rom_session>
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Rom_module const * const _rom_module = nullptr;
|
Rom_module const * const _rom_module = nullptr;
|
||||||
@ -76,7 +77,6 @@ namespace Genode {
|
|||||||
|
|
||||||
Rom_dataspace_capability dataspace() override { return _ds_cap; }
|
Rom_dataspace_capability dataspace() override { return _ds_cap; }
|
||||||
void sigh(Signal_context_capability) override { }
|
void sigh(Signal_context_capability) override { }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_ */
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Rpc_cap_factory; }
|
namespace Genode { class Rpc_cap_factory; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Rpc_cap_factory
|
class Genode::Rpc_cap_factory
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Signal_broker; }
|
namespace Genode { class Signal_broker; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Signal_broker
|
class Genode::Signal_broker
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -15,18 +15,23 @@
|
|||||||
#define _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_
|
#define _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
struct Signal_delivery_proxy;
|
||||||
|
struct Signal_delivery_proxy_component;
|
||||||
|
}
|
||||||
|
|
||||||
struct Signal_delivery_proxy : Interface
|
|
||||||
{
|
struct Genode::Signal_delivery_proxy : Interface
|
||||||
|
{
|
||||||
GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned);
|
GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned);
|
||||||
GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t);
|
GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t);
|
||||||
GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release);
|
GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Signal_delivery_proxy_component
|
|
||||||
:
|
struct Genode::Signal_delivery_proxy_component
|
||||||
|
:
|
||||||
Rpc_object<Signal_delivery_proxy, Signal_delivery_proxy_component>
|
Rpc_object<Signal_delivery_proxy, Signal_delivery_proxy_component>
|
||||||
{
|
{
|
||||||
Rpc_entrypoint &_ep;
|
Rpc_entrypoint &_ep;
|
||||||
|
|
||||||
Capability<Signal_delivery_proxy> _proxy_cap;
|
Capability<Signal_delivery_proxy> _proxy_cap;
|
||||||
@ -91,7 +96,6 @@ namespace Genode {
|
|||||||
*/
|
*/
|
||||||
void release(Signal_context_component &context) {
|
void release(Signal_context_component &context) {
|
||||||
_proxy_cap.call<Rpc_release>(reinterpret_cast<addr_t>(&context)); }
|
_proxy_cap.call<Rpc_release>(reinterpret_cast<addr_t>(&context)); }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__SIGNLA_DELIVERY_PROXY_H_ */
|
#endif /* _CORE__INCLUDE__SIGNLA_DELIVERY_PROXY_H_ */
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
namespace Genode { class Vm_root; }
|
namespace Genode { class Vm_root; }
|
||||||
|
|
||||||
|
|
||||||
class Genode::Vm_root : public Root_component<Vm_session_component>
|
class Genode::Vm_root : public Root_component<Vm_session_component>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user