mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
361557e1f0
commit
19c13877ca
@ -45,7 +45,7 @@ class Core::Platform : public Platform_generic
|
||||
/*
|
||||
* Shortcut for the type of allocator instances for physical resources
|
||||
*/
|
||||
typedef Synced_range_allocator<Allocator_avl> Phys_allocator;
|
||||
using Phys_allocator = Synced_range_allocator<Allocator_avl>;
|
||||
|
||||
char _core_label[1]; /* to satisfy _core_pd */
|
||||
Platform_pd *_core_pd = nullptr; /* core protection domain object */
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace Genode {
|
||||
|
||||
typedef Fiasco::l4_threadid_t Rpc_destination;
|
||||
using Rpc_destination = Fiasco::l4_threadid_t;
|
||||
|
||||
static inline Rpc_destination invalid_rpc_destination()
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ class Core::Platform : public Platform_generic
|
||||
/*
|
||||
* Shortcut for the type of allocator instances for physical resources
|
||||
*/
|
||||
typedef Synced_range_allocator<Allocator_avl> Phys_allocator;
|
||||
using Phys_allocator = Synced_range_allocator<Allocator_avl>;
|
||||
|
||||
Platform_pd *_core_pd = nullptr; /* core protection domain object */
|
||||
Phys_allocator _ram_alloc; /* RAM allocator */
|
||||
|
@ -45,7 +45,7 @@ class Core::Platform_thread : Interface
|
||||
|
||||
enum State { DEAD, RUNNING };
|
||||
|
||||
typedef String<32> Name;
|
||||
using Name = String<32>;
|
||||
|
||||
friend class Platform_pd;
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace Core {
|
||||
|
||||
enum { MAX_VCPU_IDS = (Platform::VCPU_VIRT_EXT_END -
|
||||
Platform::VCPU_VIRT_EXT_START) / L4_PAGESIZE };
|
||||
typedef Bit_allocator<MAX_VCPU_IDS> Vcpu_id_allocator;
|
||||
using Vcpu_id_allocator = Bit_allocator<MAX_VCPU_IDS>;
|
||||
}
|
||||
|
||||
|
||||
@ -78,8 +78,8 @@ class Core::Vm_session_component
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Constrained_ram_allocator Con_ram_allocator;
|
||||
typedef Allocator_avl_tpl<Rm_region> Avl_region;
|
||||
using Con_ram_allocator = Constrained_ram_allocator;
|
||||
using Avl_region = Allocator_avl_tpl<Rm_region>;
|
||||
|
||||
Rpc_entrypoint &_ep;
|
||||
Con_ram_allocator _constrained_md_ram_alloc;
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
namespace Genode {
|
||||
|
||||
typedef Native_capability::Data Cap_index;
|
||||
using Cap_index = Native_capability::Data;
|
||||
|
||||
class Cap_index_allocator;
|
||||
|
||||
|
@ -585,8 +585,8 @@ struct Foc_vcpu : Thread, Noncopyable
|
||||
using Foc::l4_vm_vmx_read_16;
|
||||
using Foc::l4_vm_vmx_read_32;
|
||||
using Foc::l4_vm_vmx_read_nat;
|
||||
typedef Vcpu_state::Segment Segment;
|
||||
typedef Vcpu_state::Range Range;
|
||||
using Segment = Vcpu_state::Segment;
|
||||
using Range = Vcpu_state::Range;
|
||||
|
||||
{
|
||||
Segment cs { l4_vm_vmx_read_16(vmcs, Vmcs::CS_SEL),
|
||||
@ -754,7 +754,7 @@ struct Foc_vcpu : Thread, Noncopyable
|
||||
vmcb_cr4_shadow = state.cr4.value();
|
||||
}
|
||||
|
||||
typedef Vcpu_state::Segment Segment;
|
||||
using Segment = Vcpu_state::Segment;
|
||||
|
||||
state.cs.charge(Segment{vmcb->state_save_area.cs.selector,
|
||||
vmcb->state_save_area.cs.attrib,
|
||||
@ -796,7 +796,7 @@ struct Foc_vcpu : Thread, Noncopyable
|
||||
vmcb->state_save_area.ldtr.limit,
|
||||
(addr_t)vmcb->state_save_area.ldtr.base});
|
||||
|
||||
typedef Vcpu_state::Range Range;
|
||||
using Range = Vcpu_state::Range;
|
||||
|
||||
state.gdtr.charge(Range{.limit = vmcb->state_save_area.gdtr.limit,
|
||||
.base = (addr_t)vmcb->state_save_area.gdtr.base });
|
||||
|
@ -68,7 +68,7 @@ class Kernel::Cpu : public Core::Cpu, private Irq::Pool, private Timeout
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Cpu_job Job;
|
||||
using Job = Cpu_job;
|
||||
|
||||
/**
|
||||
* Inter-processor-interrupt object of the cpu
|
||||
|
@ -191,7 +191,7 @@ void Signal_receiver::_listen()
|
||||
return;
|
||||
|
||||
/* create a signal data-object */
|
||||
typedef Genode::Signal_context * Signal_imprint;
|
||||
using Signal_imprint = Genode::Signal_context *;
|
||||
|
||||
_deliver.dequeue([&] (Signal_context::Fifo_element &elem) {
|
||||
auto const context = &elem.object();
|
||||
|
@ -59,7 +59,7 @@ class Kernel::Signal_handler
|
||||
Signal_handler(Signal_handler const &);
|
||||
Signal_handler &operator = (Signal_handler const &);
|
||||
|
||||
typedef Genode::Fifo_element<Signal_handler> Fifo_element;
|
||||
using Fifo_element = Genode::Fifo_element<Signal_handler>;
|
||||
|
||||
Thread &_thread;
|
||||
Fifo_element _handlers_fe { *this };
|
||||
@ -119,7 +119,7 @@ class Kernel::Signal_context
|
||||
Signal_context(Signal_context const &);
|
||||
Signal_context &operator = (Signal_context const &);
|
||||
|
||||
typedef Genode::Fifo_element<Signal_context> Fifo_element;
|
||||
using Fifo_element = Genode::Fifo_element<Signal_context>;
|
||||
|
||||
Kernel::Object _kernel_object { *this };
|
||||
Fifo_element _deliver_fe { *this };
|
||||
@ -226,7 +226,7 @@ class Kernel::Signal_receiver
|
||||
|
||||
private:
|
||||
|
||||
typedef Genode::Signal Signal;
|
||||
using Signal = Genode::Signal;
|
||||
|
||||
template <typename T> class Fifo : public Genode::Fifo<T> { };
|
||||
|
||||
|
@ -53,7 +53,7 @@ class Core::Platform_thread : Noncopyable
|
||||
Platform_thread(Platform_thread const &);
|
||||
Platform_thread &operator = (Platform_thread const &);
|
||||
|
||||
typedef String<32> Label;
|
||||
using Label = String<32>;
|
||||
|
||||
Label const _label;
|
||||
Platform_pd &_pd;
|
||||
|
@ -27,8 +27,8 @@ namespace Core {
|
||||
class Signal_context_component;
|
||||
class Signal_source_component;
|
||||
|
||||
typedef Object_pool<Signal_context_component> Signal_context_pool;
|
||||
typedef Object_pool<Signal_source_component> Signal_source_pool;
|
||||
using Signal_context_pool = Object_pool<Signal_context_component>;
|
||||
using Signal_source_pool = Object_pool<Signal_source_component>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace Core {
|
||||
*/
|
||||
class Cpu;
|
||||
|
||||
typedef __uint128_t sizet_arithm_t;
|
||||
using sizet_arithm_t = __uint128_t;
|
||||
}
|
||||
|
||||
|
||||
|
@ -487,10 +487,10 @@ void Vmcs::prepare_vmcs()
|
||||
|
||||
void Vmcs::write_vcpu_state(Genode::Vcpu_state &state)
|
||||
{
|
||||
typedef Genode::Vcpu_state::Range Range;
|
||||
typedef Genode::Vcpu_state::Segment Segment;
|
||||
using Range = Genode::Vcpu_state::Range;
|
||||
using Segment = Genode::Vcpu_state::Segment;
|
||||
using Cpu = Hw::X86_64_cpu;
|
||||
|
||||
using Cpu = Hw::X86_64_cpu;
|
||||
using Genode::uint16_t;
|
||||
using Genode::uint32_t;
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Core::Vm_session_component
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Allocator_avl_tpl<Rm_region> Avl_region;
|
||||
using Avl_region = Allocator_avl_tpl<Rm_region>;
|
||||
|
||||
/*
|
||||
* Noncopyable
|
||||
|
@ -378,7 +378,7 @@ void Hw::for_each_rsdt_entry(Hw::Acpi_generic &rsdt, auto const &fn)
|
||||
if (Genode::memcmp(rsdt.signature, "RSDT", 4))
|
||||
return;
|
||||
|
||||
typedef Genode::uint32_t entry_t;
|
||||
using entry_t = Genode::uint32_t;
|
||||
|
||||
unsigned const table_size = rsdt.size;
|
||||
unsigned const entry_count = (unsigned)((table_size - sizeof(rsdt)) / sizeof(entry_t));
|
||||
@ -394,7 +394,7 @@ void Hw::for_each_xsdt_entry(Hw::Acpi_generic &xsdt, auto const &fn)
|
||||
if (Genode::memcmp(xsdt.signature, "XSDT", 4))
|
||||
return;
|
||||
|
||||
typedef Genode::uint64_t entry_t;
|
||||
using entry_t = Genode::uint64_t;
|
||||
|
||||
unsigned const table_size = xsdt.size;
|
||||
unsigned const entry_count = (unsigned)((table_size - sizeof(xsdt)) / sizeof(entry_t));
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint64_t Timestamp;
|
||||
using Timestamp = uint64_t;
|
||||
|
||||
/*
|
||||
* In Linux/AARCH64, the 'mrs' instruction cannot be executed in user land.
|
||||
|
@ -81,7 +81,7 @@ class Genode::Capability_space_tpl : Noncopyable
|
||||
{
|
||||
private:
|
||||
|
||||
typedef CAP_DATA Data;
|
||||
using Data = CAP_DATA;
|
||||
|
||||
/**
|
||||
* Supplement Native_capability::Data with the meta data needed to
|
||||
|
@ -110,7 +110,7 @@ namespace {
|
||||
|
||||
private:
|
||||
|
||||
typedef Genode::size_t size_t;
|
||||
using size_t = Genode::size_t;
|
||||
|
||||
msghdr _msg { };
|
||||
iovec _iovec { };
|
||||
|
@ -427,7 +427,7 @@ namespace {
|
||||
|
||||
struct Global_allocator : Allocator
|
||||
{
|
||||
typedef Genode::size_t size_t;
|
||||
using size_t = Genode::size_t;
|
||||
|
||||
Alloc_result try_alloc(size_t size) override { return malloc(size); }
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace Genode { namespace Capability_space {
|
||||
|
||||
static constexpr unsigned long INVALID_INDEX = ~0UL;
|
||||
|
||||
typedef Nova::Crd Ipc_cap_data;
|
||||
using Ipc_cap_data = Nova::Crd;
|
||||
|
||||
static inline Nova::Crd crd(Native_capability const &cap)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ static int map_local(Genode::addr_t const pd, Nova::Utcb &utcb,
|
||||
Nova::uint8_t res = Nova::delegate(pd, pd, dst_crd);
|
||||
if (res != Nova::NOVA_OK) {
|
||||
|
||||
typedef Genode::Hex Hex;
|
||||
using Hex = Genode::Hex;
|
||||
error("map_local failed ",
|
||||
Hex(src_crd.addr()), ":", Hex(src_crd.order()), ":", Hex(src_crd.type()), "->",
|
||||
Hex(dst_crd.addr()), ":", Hex(dst_crd.order()), ":", Hex(dst_crd.type()), " - ",
|
||||
|
@ -37,8 +37,8 @@ class Core::Vm_session_component
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Constrained_ram_allocator Con_ram_allocator;
|
||||
typedef Allocator_avl_tpl<Rm_region> Avl_region;
|
||||
using Con_ram_allocator = Constrained_ram_allocator;
|
||||
using Avl_region = Allocator_avl_tpl<Rm_region>;
|
||||
|
||||
class Vcpu : public Rpc_object<Vm_session::Native_vcpu, Vcpu>,
|
||||
public Trace::Source::Info_accessor
|
||||
|
@ -229,7 +229,7 @@ Rpc_entrypoint::Rpc_entrypoint(Pd_session *pd_session, size_t stack_size,
|
||||
|
||||
Rpc_entrypoint::~Rpc_entrypoint()
|
||||
{
|
||||
typedef Object_pool<Rpc_object_base> Pool;
|
||||
using Pool = Object_pool<Rpc_object_base>;
|
||||
|
||||
Pool::remove_all([&] (Rpc_object_base *obj) {
|
||||
warning("object pool not empty in ", __func__);
|
||||
|
@ -48,7 +48,7 @@ struct Nova_vcpu : Rpc_client<Vm_session::Native_vcpu>, Noncopyable
|
||||
|
||||
enum { VM_EXIT_STARTUP = 0xfe, VM_EXIT_RECALL = 0xff };
|
||||
|
||||
typedef Id_space<Nova_vcpu> Vcpu_space;
|
||||
using Vcpu_space = Id_space<Nova_vcpu>;
|
||||
|
||||
static Vcpu_space &_vcpu_space()
|
||||
{
|
||||
@ -168,8 +168,8 @@ struct Nova_vcpu : Rpc_client<Vm_session::Native_vcpu>, Noncopyable
|
||||
|
||||
void Nova_vcpu::_read_nova_state(Nova::Utcb &utcb)
|
||||
{
|
||||
typedef Genode::Vcpu_state::Segment Segment;
|
||||
typedef Genode::Vcpu_state::Range Range;
|
||||
using Segment = Genode::Vcpu_state::Segment;
|
||||
using Range = Genode::Vcpu_state::Range;
|
||||
|
||||
_vcpu_state.discharge();
|
||||
_vcpu_state.exit_reason = static_cast<unsigned int>(utcb.exit_reason);
|
||||
|
@ -74,7 +74,7 @@ struct Test::Component : Genode::Rpc_object<Test::Session, Test::Component>
|
||||
Genode::Native_capability cap_cap(Genode::addr_t);
|
||||
};
|
||||
|
||||
namespace Test { typedef Genode::Capability<Test::Session> Capability; }
|
||||
namespace Test { using Capability = Genode::Capability<Test::Session>; }
|
||||
|
||||
/**
|
||||
* Session implementation
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace Genode {
|
||||
|
||||
typedef Okl4::L4_ThreadId_t Rpc_destination;
|
||||
using Rpc_destination = Okl4::L4_ThreadId_t;
|
||||
|
||||
static inline Rpc_destination invalid_rpc_destination()
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ class Core::Platform : public Platform_generic
|
||||
/*
|
||||
* Shortcut for the type of allocator instances for physical resources
|
||||
*/
|
||||
typedef Synced_range_allocator<Allocator_avl> Phys_allocator;
|
||||
using Phys_allocator = Synced_range_allocator<Allocator_avl>;
|
||||
|
||||
Phys_allocator _ram_alloc; /* RAM allocator */
|
||||
Phys_allocator _io_mem_alloc; /* MMIO allocator */
|
||||
|
@ -48,7 +48,7 @@ class Core::Platform_thread : Interface
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Pistachio::L4_ThreadId_t L4_ThreadId_t;
|
||||
using L4_ThreadId_t = Pistachio::L4_ThreadId_t;
|
||||
|
||||
/*
|
||||
* Noncopyable
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace Genode {
|
||||
|
||||
typedef Pistachio::L4_ThreadId_t Rpc_destination;
|
||||
using Rpc_destination = Pistachio::L4_ThreadId_t;
|
||||
|
||||
static inline Rpc_destination invalid_rpc_destination()
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ class Core::Cnode_base
|
||||
|
||||
public:
|
||||
|
||||
typedef Cnode_index Index;
|
||||
using Index = Cnode_index;
|
||||
|
||||
Cap_sel sel() const { return _sel; }
|
||||
uint8_t size_log2() const { return _size_log2; }
|
||||
|
@ -158,7 +158,7 @@ class Core::Platform : public Platform_generic
|
||||
* XXX Consider making Bit_allocator::_reserve public so that we can
|
||||
* turn the bit allocator into a private member of 'Core_sel_alloc'.
|
||||
*/
|
||||
typedef Bit_allocator<1 << Core_cspace::NUM_CORE_SEL_LOG2> Core_sel_bit_alloc;
|
||||
using Core_sel_bit_alloc = Bit_allocator<1 << Core_cspace::NUM_CORE_SEL_LOG2>;
|
||||
|
||||
struct Core_sel_alloc : Cap_sel_alloc, private Core_sel_bit_alloc
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ class Core::Vm_session_component
|
||||
Capability<Dataspace> state() const { return _ds_cap; }
|
||||
};
|
||||
|
||||
typedef Allocator_avl_tpl<Rm_region> Avl_region;
|
||||
using Avl_region = Allocator_avl_tpl<Rm_region>;
|
||||
|
||||
Rpc_entrypoint &_ep;
|
||||
Constrained_ram_allocator _constrained_md_ram_alloc;
|
||||
|
@ -152,7 +152,7 @@ void Core::Platform::_init_allocators()
|
||||
stack_area_virtual_size());
|
||||
|
||||
if (verbose_boot_info) {
|
||||
typedef Hex_range<addr_t> Hex_range;
|
||||
using Hex_range = Hex_range<addr_t>;
|
||||
log("virtual address layout of core:");
|
||||
log(" overall ", Hex_range(_vm_base, _vm_size));
|
||||
log(" core image ", Hex_range(core_virt_beg, image_elf_size));
|
||||
|
@ -139,7 +139,7 @@ class Genode::Capability_space_sel4
|
||||
|
||||
private:
|
||||
|
||||
typedef CAP_DATA Data;
|
||||
using Data = CAP_DATA;
|
||||
|
||||
/**
|
||||
* Supplement Native_capability::Data with the meta data needed to
|
||||
|
@ -676,8 +676,8 @@ struct Sel4_vcpu : Genode::Thread, Noncopyable
|
||||
_write_vmcs(service, Vmcs::CR4_SHADOW, state.cr4.value());
|
||||
}
|
||||
|
||||
typedef Genode::Vcpu_state::Segment Segment;
|
||||
typedef Genode::Vcpu_state::Range Range;
|
||||
using Segment = Genode::Vcpu_state::Segment;
|
||||
using Range = Genode::Vcpu_state::Range;
|
||||
|
||||
state.cs.charge(Segment{_read_vmcs_16(service, Vmcs::CS_SEL),
|
||||
_convert_ar_16(_read_vmcs(service, Vmcs::CS_AR)),
|
||||
|
@ -39,7 +39,7 @@ namespace Genode {
|
||||
* Define AVL-based allocator without any meta data attached to each block
|
||||
*/
|
||||
class Empty { };
|
||||
typedef Allocator_avl_tpl<Empty> Allocator_avl;
|
||||
using Allocator_avl = Allocator_avl_tpl<Empty>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Genode {
|
||||
/**
|
||||
* Capability that is not associated with a specific RPC interface
|
||||
*/
|
||||
typedef Native_capability Untyped_capability;
|
||||
using Untyped_capability = Native_capability;
|
||||
|
||||
template <typename> class Capability;
|
||||
|
||||
@ -123,7 +123,7 @@ class Genode::Capability : public Untyped_capability
|
||||
template <typename IF, unsigned I>
|
||||
struct Arg
|
||||
{
|
||||
typedef typename Meta::Type_at<typename IF::Client_args, I>::Type Type;
|
||||
using Type = typename Meta::Type_at<typename IF::Client_args, I>::Type;
|
||||
};
|
||||
|
||||
template <typename FROM_RPC_INTERFACE>
|
||||
@ -138,7 +138,7 @@ class Genode::Capability : public Untyped_capability
|
||||
|
||||
public:
|
||||
|
||||
typedef RPC_INTERFACE Rpc_interface;
|
||||
using Rpc_interface = RPC_INTERFACE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -45,9 +45,9 @@ namespace Genode {
|
||||
*/
|
||||
struct Genode::Child_policy
|
||||
{
|
||||
typedef String<64> Name;
|
||||
typedef String<64> Binary_name;
|
||||
typedef String<64> Linker_name;
|
||||
using Name = String<64>;
|
||||
using Binary_name = String<64>;
|
||||
using Linker_name = String<64>;
|
||||
|
||||
virtual ~Child_policy() { }
|
||||
|
||||
@ -299,7 +299,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
|
||||
using Initial_thread_base::Start;
|
||||
|
||||
typedef Cpu_session::Name Name;
|
||||
using Name = Cpu_session::Name;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -351,7 +351,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
Session_state::Factory _session_factory { _session_md_alloc,
|
||||
_session_batch_size };
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
|
||||
/*
|
||||
* Members that are initialized not before the child's environment is
|
||||
@ -457,7 +457,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
|
||||
Id_space<Parent::Client>::Id const _client_id;
|
||||
|
||||
typedef String<64> Label;
|
||||
using Label = String<64>;
|
||||
|
||||
Args const _args;
|
||||
|
||||
@ -643,7 +643,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
"environment session denied (", _args.string(), ")"); }
|
||||
}
|
||||
|
||||
typedef typename CONNECTION::Session_type SESSION;
|
||||
using SESSION = typename CONNECTION::Session_type;
|
||||
|
||||
SESSION &session() { return _connection->session(); }
|
||||
SESSION const &session() const { return _connection->session(); }
|
||||
|
@ -39,7 +39,7 @@ class Genode::Msgbuf_base : Noncopyable
|
||||
* Resolve ambiguity if the header is included from a libc-using
|
||||
* program.
|
||||
*/
|
||||
typedef Genode::size_t size_t;
|
||||
using size_t = Genode::size_t;
|
||||
|
||||
/*
|
||||
* Capabilities to be transferred
|
||||
|
@ -31,7 +31,7 @@ struct Genode::Local_connection_base : Noncopyable
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
|
||||
protected:
|
||||
|
||||
@ -114,7 +114,7 @@ class Genode::Local_connection : Local_connection_base
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename CONNECTION::Session_type SESSION;
|
||||
using SESSION = typename CONNECTION::Session_type;
|
||||
|
||||
Constructible <typename SESSION::Client> _client { };
|
||||
|
||||
|
@ -121,9 +121,8 @@ class Genode::Trace_output
|
||||
|
||||
/* cannot include log_session.h here because of recursion */
|
||||
enum { LOG_SESSION_MAX_STRING_LEN = 232 };
|
||||
typedef Buffered_output<LOG_SESSION_MAX_STRING_LEN,
|
||||
Write_trace_fn>
|
||||
Buffered_trace_output;
|
||||
using Buffered_trace_output =
|
||||
Buffered_output<LOG_SESSION_MAX_STRING_LEN, Write_trace_fn>;
|
||||
|
||||
public:
|
||||
|
||||
@ -210,7 +209,7 @@ class Genode::Log_tsc_probe : Noncopyable
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Trace::Timestamp Timestamp;
|
||||
using Timestamp = Trace::Timestamp;
|
||||
|
||||
struct Pretty_tsc
|
||||
{
|
||||
|
@ -289,11 +289,11 @@ class Genode::Quota_guard
|
||||
|
||||
namespace Genode {
|
||||
|
||||
typedef Quota_guard<Ram_quota> Ram_quota_guard;
|
||||
typedef Quota_guard<Cap_quota> Cap_quota_guard;
|
||||
using Ram_quota_guard = Quota_guard<Ram_quota>;
|
||||
using Cap_quota_guard = Quota_guard<Cap_quota>;
|
||||
|
||||
typedef Ram_quota_guard::Limit_exceeded Out_of_ram;
|
||||
typedef Cap_quota_guard::Limit_exceeded Out_of_caps;
|
||||
using Out_of_ram = Ram_quota_guard::Limit_exceeded;
|
||||
using Out_of_caps = Cap_quota_guard::Limit_exceeded;
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__BASE__QUOTA_GUARD_H_ */
|
||||
|
@ -24,7 +24,7 @@ namespace Genode {
|
||||
|
||||
struct Ram_dataspace : Dataspace { };
|
||||
|
||||
typedef Capability<Ram_dataspace> Ram_dataspace_capability;
|
||||
using Ram_dataspace_capability = Capability<Ram_dataspace>;
|
||||
|
||||
struct Ram_allocator;
|
||||
|
||||
|
@ -37,10 +37,10 @@
|
||||
*/
|
||||
#define GENODE_RPC_THROW(rpc_name, ret_type, func_name, exc_types, ...) \
|
||||
struct rpc_name { \
|
||||
typedef ::Genode::Meta::Ref_args<__VA_ARGS__>::Type Client_args; \
|
||||
typedef ::Genode::Meta::Pod_args<__VA_ARGS__>::Type Server_args; \
|
||||
typedef ::Genode::Trait::Exc_list<exc_types>::Type Exceptions; \
|
||||
typedef ::Genode::Trait::Call_return<ret_type>::Type Ret_type; \
|
||||
using Client_args = ::Genode::Meta::Ref_args<__VA_ARGS__>::Type; \
|
||||
using Server_args = ::Genode::Meta::Pod_args<__VA_ARGS__>::Type; \
|
||||
using Exceptions = ::Genode::Trait::Exc_list<exc_types>::Type; \
|
||||
using Ret_type = ::Genode::Trait::Call_return<ret_type>::Type; \
|
||||
\
|
||||
template <typename SERVER, typename RET> \
|
||||
static RET serve(SERVER &server, Server_args &args) { \
|
||||
@ -66,7 +66,7 @@
|
||||
* this type list.
|
||||
*/
|
||||
#define GENODE_RPC_INTERFACE(...) \
|
||||
typedef GENODE_TYPE_LIST(__VA_ARGS__) Rpc_functions
|
||||
using Rpc_functions = GENODE_TYPE_LIST(__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* Macro for declaring a RPC interface derived from another RPC interface
|
||||
@ -80,10 +80,9 @@
|
||||
* the inherited RPC functions are preserved.
|
||||
*/
|
||||
#define GENODE_RPC_INTERFACE_INHERIT(base, ...) \
|
||||
typedef ::Genode::Meta::Append<base::Rpc_functions, \
|
||||
GENODE_TYPE_LIST(__VA_ARGS__) >::Type \
|
||||
Rpc_functions; \
|
||||
typedef base Rpc_inherited_interface;
|
||||
using Rpc_functions = ::Genode::Meta::Append<base::Rpc_functions, \
|
||||
GENODE_TYPE_LIST(__VA_ARGS__) >::Type; \
|
||||
using Rpc_inherited_interface = base;
|
||||
|
||||
|
||||
namespace Genode {
|
||||
@ -101,11 +100,11 @@ namespace Genode {
|
||||
template <typename T> struct Rpc_direction;
|
||||
|
||||
|
||||
template <typename T> struct Rpc_direction { typedef Rpc_arg_in Type; };
|
||||
template <typename T> struct Rpc_direction<T const *> { typedef Rpc_arg_in Type; };
|
||||
template <typename T> struct Rpc_direction<T const &> { typedef Rpc_arg_in Type; };
|
||||
template <typename T> struct Rpc_direction<T*> { typedef Rpc_arg_inout Type; };
|
||||
template <typename T> struct Rpc_direction<T&> { typedef Rpc_arg_inout Type; };
|
||||
template <typename T> struct Rpc_direction { using Type = Rpc_arg_in; };
|
||||
template <typename T> struct Rpc_direction<T const *> { using Type = Rpc_arg_in; };
|
||||
template <typename T> struct Rpc_direction<T const &> { using Type = Rpc_arg_in; };
|
||||
template <typename T> struct Rpc_direction<T*> { using Type = Rpc_arg_inout; };
|
||||
template <typename T> struct Rpc_direction<T&> { using Type = Rpc_arg_inout; };
|
||||
|
||||
/**
|
||||
* Representation of function return type
|
||||
@ -115,8 +114,8 @@ namespace Genode {
|
||||
* regardless of the presence of a return type with the same meta
|
||||
* program.
|
||||
*/
|
||||
template <typename T> struct Call_return { typedef T Type; };
|
||||
template <> struct Call_return<void> { typedef Meta::Empty Type; };
|
||||
template <typename T> struct Call_return { using Type = T; };
|
||||
template <> struct Call_return<void> { using Type = Meta::Empty; };
|
||||
|
||||
/**
|
||||
* Representation of the list of exception types
|
||||
@ -124,8 +123,8 @@ namespace Genode {
|
||||
* This template maps the special case of a 'Type_list' with no arguments
|
||||
* to the 'Empty' type.
|
||||
*/
|
||||
template <typename T> struct Exc_list { typedef T Type; };
|
||||
template <> struct Exc_list<Meta::Type_list<> > { typedef Meta::Empty Type; };
|
||||
template <typename T> struct Exc_list { using Type = T; };
|
||||
template <> struct Exc_list<Meta::Type_list<> > { using Type = Meta::Empty; };
|
||||
}
|
||||
|
||||
|
||||
@ -202,7 +201,7 @@ namespace Genode {
|
||||
*/
|
||||
template <typename ARGS, bool IN, bool OUT>
|
||||
struct Rpc_args_size {
|
||||
typedef typename ARGS::Head This;
|
||||
using This = typename ARGS::Head;
|
||||
enum { This_size = Rpc_transfer_size<This>::Value };
|
||||
enum { Value = (IN && Trait::Rpc_direction<This>::Type::IN ? This_size : 0)
|
||||
+ (OUT && Trait::Rpc_direction<This>::Type::OUT ? This_size : 0)
|
||||
@ -235,7 +234,7 @@ namespace Genode {
|
||||
*/
|
||||
template <typename RPC_FUNCTION, bool IN, bool OUT>
|
||||
struct Rpc_msg_payload_size {
|
||||
typedef typename RPC_FUNCTION::Server_args Args;
|
||||
using Args = typename RPC_FUNCTION::Server_args;
|
||||
enum { Value = Rpc_args_size<Args, IN, OUT>::Value }; };
|
||||
|
||||
|
||||
@ -305,7 +304,7 @@ namespace Genode {
|
||||
*/
|
||||
template <typename RPC_IF, Rpc_msg_type MSG_TYPE>
|
||||
struct Rpc_interface_msg_size {
|
||||
typedef typename RPC_IF::Rpc_functions Rpc_functions;
|
||||
using Rpc_functions = typename RPC_IF::Rpc_functions;
|
||||
enum { Value = Rpc_function_list_msg_size<Rpc_functions, MSG_TYPE>::Value }; };
|
||||
|
||||
|
||||
@ -315,8 +314,8 @@ namespace Genode {
|
||||
template <typename INTERFACE>
|
||||
struct Rpc_interface_is_inherited
|
||||
{
|
||||
typedef char yes[1];
|
||||
typedef char no[2];
|
||||
using yes = char[1];
|
||||
using no = char[2];
|
||||
|
||||
template <typename IF>
|
||||
static yes &test(typename IF::Rpc_inherited_interface *);
|
||||
|
@ -109,7 +109,7 @@ namespace Genode {
|
||||
* '_unmarshal_result' is selected depending on the RPC
|
||||
* direction.
|
||||
*/
|
||||
typedef typename Trait::Rpc_direction<typename ATL::Head>::Type Rpc_dir;
|
||||
using Rpc_dir = typename Trait::Rpc_direction<typename ATL::Head>::Type;
|
||||
_unmarshal_result(unmarshaller, args.get(), Meta::Overload_selector<Rpc_dir>());
|
||||
|
||||
/* unmarshal remaining arguments */
|
||||
@ -137,7 +137,7 @@ namespace Genode {
|
||||
Msgbuf<REPLY_MSG_SIZE + PROTOCOL_OVERHEAD> reply_buf;
|
||||
|
||||
/* determine opcode of RPC function */
|
||||
typedef typename RPC_INTERFACE::Rpc_functions Rpc_functions;
|
||||
using Rpc_functions = typename RPC_INTERFACE::Rpc_functions;
|
||||
Rpc_opcode opcode(static_cast<int>(Meta::Index_of<Rpc_functions, IF>::Value));
|
||||
|
||||
/* marshal opcode and RPC input arguments */
|
||||
@ -194,7 +194,7 @@ class Genode::Rpc_client : public RPC_INTERFACE
|
||||
|
||||
public:
|
||||
|
||||
typedef RPC_INTERFACE Rpc_interface;
|
||||
using Rpc_interface = RPC_INTERFACE;
|
||||
|
||||
Rpc_client(Capability<RPC_INTERFACE> const &cap) : _cap(cap) { }
|
||||
|
||||
|
@ -60,7 +60,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
* Shortcut for the type list of RPC functions provided by this server
|
||||
* component
|
||||
*/
|
||||
typedef typename RPC_INTERFACE::Rpc_functions Rpc_functions;
|
||||
using Rpc_functions = typename RPC_INTERFACE::Rpc_functions;
|
||||
|
||||
protected:
|
||||
|
||||
@ -69,7 +69,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
Meta::Overload_selector<ARG_LIST>)
|
||||
{
|
||||
typename Trait::Rpc_direction<typename ARG_LIST::Head>::Type direction;
|
||||
typedef typename ARG_LIST::Stored_head Arg;
|
||||
using Arg = typename ARG_LIST::Stored_head;
|
||||
Arg arg = _read_arg<Arg>(msg, direction);
|
||||
|
||||
Meta::Overload_selector<typename ARG_LIST::Tail> tail_selector;
|
||||
@ -124,7 +124,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
EXCEPTION_CODE = Rpc_exception_code::EXCEPTION_BASE
|
||||
- Meta::Length<EXC_TL>::Value;
|
||||
try {
|
||||
typedef typename EXC_TL::Tail Exc_tail;
|
||||
using Exc_tail = typename EXC_TL::Tail;
|
||||
return _do_serve(args,
|
||||
Meta::Overload_selector<RPC_FUNCTION, Exc_tail>());
|
||||
} catch (typename EXC_TL::Head) {
|
||||
@ -142,7 +142,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
_do_serve(typename RPC_FUNCTION::Server_args &args,
|
||||
Meta::Overload_selector<RPC_FUNCTION, Meta::Empty>)
|
||||
{
|
||||
typedef typename RPC_FUNCTION::Ret_type Ret_type;
|
||||
using Ret_type = typename RPC_FUNCTION::Ret_type;
|
||||
SERVER *me = static_cast<SERVER *>(this);
|
||||
return RPC_FUNCTION::template serve<SERVER, Ret_type>(*me, args);
|
||||
}
|
||||
@ -154,12 +154,12 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
{
|
||||
using namespace Meta;
|
||||
|
||||
typedef typename RPC_FUNCTIONS_TO_CHECK::Head This_rpc_function;
|
||||
using This_rpc_function = typename RPC_FUNCTIONS_TO_CHECK::Head;
|
||||
|
||||
if (opcode.value == Index_of<Rpc_functions, This_rpc_function>::Value) {
|
||||
|
||||
/* read arguments from incoming message */
|
||||
typedef typename This_rpc_function::Server_args Server_args;
|
||||
using Server_args = typename This_rpc_function::Server_args;
|
||||
Meta::Overload_selector<Server_args> arg_selector;
|
||||
Server_args args = _read_args(in, arg_selector);
|
||||
|
||||
@ -173,10 +173,10 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
* select the overload.
|
||||
*/
|
||||
|
||||
typedef typename This_rpc_function::Ret_type Ret_type;
|
||||
using Ret_type = typename This_rpc_function::Ret_type;
|
||||
Rpc_exception_code exc(Rpc_exception_code::SUCCESS);
|
||||
try {
|
||||
typedef typename This_rpc_function::Exceptions Exceptions;
|
||||
using Exceptions = typename This_rpc_function::Exceptions;
|
||||
Overload_selector<This_rpc_function, Exceptions> overloader;
|
||||
Ret_type ret = _do_serve(args, overloader);
|
||||
|
||||
@ -198,7 +198,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
|
||||
return exc;
|
||||
}
|
||||
|
||||
typedef typename RPC_FUNCTIONS_TO_CHECK::Tail Tail;
|
||||
using Tail = typename RPC_FUNCTIONS_TO_CHECK::Tail;
|
||||
return _do_dispatch(opcode, in, out, Overload_selector<Tail>());
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ class Genode::Service : public Ram_transfer::Account,
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Session_state::Name Name;
|
||||
using Name = Session_state::Name;
|
||||
|
||||
using Ram_transfer_result = Ram_transfer::Account::Transfer_result;
|
||||
using Cap_transfer_result = Cap_transfer::Account::Transfer_result;
|
||||
@ -50,7 +50,7 @@ class Genode::Service : public Ram_transfer::Account,
|
||||
|
||||
protected:
|
||||
|
||||
typedef Session_state::Factory Factory;
|
||||
using Factory = Session_state::Factory;
|
||||
|
||||
/**
|
||||
* Return factory to use for creating 'Session_state' objects
|
||||
@ -114,7 +114,7 @@ class Genode::Local_service : public Service
|
||||
|
||||
struct Factory : Interface
|
||||
{
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
|
||||
/**
|
||||
* Create session
|
||||
@ -136,7 +136,7 @@ class Genode::Local_service : public Service
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
|
||||
SESSION &_s;
|
||||
|
||||
|
@ -27,9 +27,9 @@ class Genode::Session_object : private Ram_quota_guard,
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Session::Label Label;
|
||||
typedef Session::Diag Diag;
|
||||
typedef Session::Resources Resources;
|
||||
using Label = Session::Label;
|
||||
using Diag = Session::Diag;
|
||||
using Resources = Session::Resources;
|
||||
|
||||
using Ram_quota_guard::try_withdraw;
|
||||
using Cap_quota_guard::try_withdraw;
|
||||
|
@ -37,8 +37,8 @@ class Genode::Session_state : public Parent::Client, public Parent::Server
|
||||
|
||||
class Factory;
|
||||
|
||||
typedef String<32> Name;
|
||||
typedef String<256> Args;
|
||||
using Name = String<32>;
|
||||
using Args = String<256>;
|
||||
|
||||
struct Ready_callback : Interface
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ class Genode::Dynamic_linker
|
||||
struct Object_info
|
||||
{
|
||||
/* name of shared library, or "binary" for the main program */
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
Name name;
|
||||
|
||||
Rom_dataspace_capability ds_cap;
|
||||
@ -177,8 +177,8 @@ class Genode::Dynamic_linker
|
||||
*/
|
||||
static void keep(Env &, char const *name);
|
||||
|
||||
typedef Shared_object::Invalid_rom_module Invalid_rom_module;
|
||||
typedef Shared_object::Invalid_symbol Invalid_symbol;
|
||||
using Invalid_rom_module = Shared_object::Invalid_rom_module;
|
||||
using Invalid_symbol = Shared_object::Invalid_symbol;
|
||||
|
||||
/**
|
||||
* Replace executable binary
|
||||
|
@ -43,7 +43,7 @@ namespace Genode {
|
||||
template <typename, typename> class Signal_handler;
|
||||
template <typename, typename> class Io_signal_handler;
|
||||
|
||||
typedef Capability<Signal_context> Signal_context_capability;
|
||||
using Signal_context_capability = Capability<Signal_context>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,9 +45,9 @@ class Genode::Thread
|
||||
class Stack_too_large : public Exception { };
|
||||
class Stack_alloc_failed : public Exception { };
|
||||
|
||||
typedef Affinity::Location Location;
|
||||
typedef Cpu_session::Name Name;
|
||||
typedef Cpu_session::Weight Weight;
|
||||
using Location = Affinity::Location;
|
||||
using Name = Cpu_session::Name;
|
||||
using Weight = Cpu_session::Weight;
|
||||
|
||||
struct Stack_info { addr_t base; addr_t top;
|
||||
addr_t libc_tls_pointer_offset; };
|
||||
|
@ -28,7 +28,7 @@ namespace Genode {
|
||||
*/
|
||||
inline size_t memcpy_cpu(void * dst, const void * src, size_t size)
|
||||
{
|
||||
typedef unsigned long word_t;
|
||||
using word_t = unsigned long;
|
||||
|
||||
enum {
|
||||
LEN = sizeof(word_t),
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace Genode
|
||||
{
|
||||
class Cpu_session;
|
||||
typedef Capability<Cpu_session> Cpu_session_capability;
|
||||
using Cpu_session_capability = Capability<Cpu_session>;
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__CPU_SESSION__CAPABILITY_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <dataspace/dataspace.h>
|
||||
|
||||
namespace Genode { typedef Capability<Dataspace> Dataspace_capability; }
|
||||
namespace Genode { using Dataspace_capability = Capability<Dataspace>; }
|
||||
|
||||
#endif /* _INCLUDE__DATASPACE__CAPABILITY_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <io_mem_session/io_mem_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Io_mem_session> Io_mem_session_capability; }
|
||||
namespace Genode { using Io_mem_session_capability = Capability<Io_mem_session>; }
|
||||
|
||||
#endif /* _INCLUDE__IO_MEM_SESSION__CAPABILITY_H_ */
|
||||
|
@ -22,7 +22,7 @@ namespace Genode {
|
||||
struct Io_mem_dataspace;
|
||||
struct Io_mem_session;
|
||||
|
||||
typedef Capability<Io_mem_dataspace> Io_mem_dataspace_capability;
|
||||
using Io_mem_dataspace_capability = Capability<Io_mem_dataspace>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <io_port_session/io_port_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Io_port_session> Io_port_session_capability; }
|
||||
namespace Genode { using Io_port_session_capability = Capability<Io_port_session>; }
|
||||
|
||||
#endif /* _INCLUDE__IO_PORT_SESSION__CAPABILITY_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <irq_session/irq_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Irq_session> Irq_session_capability; }
|
||||
namespace Genode { using Irq_session_capability = Capability<Irq_session>; }
|
||||
|
||||
#endif /* _INCLUDE__IRQ_SESSION__CAPABILITY_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <log_session/log_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Log_session> Log_session_capability; }
|
||||
namespace Genode { using Log_session_capability = Capability<Log_session>; }
|
||||
|
||||
#endif /* _INCLUDE__LOG_SESSION__CAPABILITY_H_ */
|
||||
|
@ -40,14 +40,14 @@ struct Genode::Log_session : Session
|
||||
static constexpr unsigned CAP_QUOTA = 2;
|
||||
static constexpr size_t RAM_QUOTA = 8*1024;
|
||||
|
||||
typedef Log_session_client Client;
|
||||
using Client = Log_session_client;
|
||||
|
||||
virtual ~Log_session() { }
|
||||
|
||||
/* the lowest platform-specific maximum IPC payload size (OKL4) */
|
||||
enum { MAX_STRING_LEN = 232 };
|
||||
|
||||
typedef Rpc_in_buffer<MAX_STRING_LEN> String;
|
||||
using String = Rpc_in_buffer<MAX_STRING_LEN>;
|
||||
|
||||
/**
|
||||
* Output null-terminated string
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <parent/parent.h>
|
||||
|
||||
namespace Genode { typedef Capability<Parent> Parent_capability; }
|
||||
namespace Genode { using Parent_capability = Capability<Parent>; }
|
||||
|
||||
#endif /* _INCLUDE__PARENT__CAPABILITY_H_ */
|
||||
|
@ -53,12 +53,12 @@ class Genode::Parent
|
||||
|
||||
public:
|
||||
|
||||
typedef Rpc_in_buffer<64> Service_name;
|
||||
typedef Rpc_in_buffer<160> Session_args;
|
||||
typedef Rpc_in_buffer<160> Upgrade_args;
|
||||
using Service_name = Rpc_in_buffer<64>;
|
||||
using Session_args = Rpc_in_buffer<160>;
|
||||
using Upgrade_args = Rpc_in_buffer<160>;
|
||||
|
||||
struct Client : Interface { typedef Id_space<Client>::Id Id; };
|
||||
struct Server : Interface { typedef Id_space<Server>::Id Id; };
|
||||
struct Client : Interface { using Id = Id_space<Client>::Id; };
|
||||
struct Server : Interface { using Id = Id_space<Server>::Id; };
|
||||
|
||||
/**
|
||||
* Predefined session IDs corresponding to the environment sessions
|
||||
@ -84,7 +84,7 @@ class Genode::Parent
|
||||
* Use 'String' instead of 'Rpc_in_buffer' because 'Resource_args'
|
||||
* is used as both in and out parameter.
|
||||
*/
|
||||
typedef String<160> Resource_args;
|
||||
using Resource_args = String<160>;
|
||||
|
||||
virtual ~Parent() { }
|
||||
|
||||
@ -125,7 +125,7 @@ class Genode::Parent
|
||||
template <typename ROOT_INTERFACE>
|
||||
void announce(Capability<ROOT_INTERFACE> const &service_root)
|
||||
{
|
||||
typedef typename ROOT_INTERFACE::Session_type Session;
|
||||
using Session = typename ROOT_INTERFACE::Session_type;
|
||||
announce(Session::service_name(), service_root);
|
||||
|
||||
/*
|
||||
@ -353,11 +353,11 @@ Genode::Parent::_announce_base(Genode::Capability<ROOT_INTERFACE> const &service
|
||||
Genode::Meta::Bool_to_type<true> *)
|
||||
{
|
||||
/* shortcut for inherited session type */
|
||||
typedef typename ROOT_INTERFACE::Session_type::Rpc_inherited_interface
|
||||
Session_type_inherited;
|
||||
using Session_type_inherited =
|
||||
typename ROOT_INTERFACE::Session_type::Rpc_inherited_interface;
|
||||
|
||||
/* shortcut for root interface type matching the inherited session type */
|
||||
typedef Typed_root<Session_type_inherited> Root_inherited;
|
||||
using Root_inherited = Typed_root<Session_type_inherited>;
|
||||
|
||||
/* convert root capability to match the inherited session type */
|
||||
Capability<Root> root = service_root;
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <pd_session/pd_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Pd_session> Pd_session_capability; }
|
||||
namespace Genode { using Pd_session_capability = Capability<Pd_session>; }
|
||||
|
||||
#endif /* _INCLUDE__PD_SESSION__CAPABILITY_H_ */
|
||||
|
@ -49,7 +49,7 @@ struct Genode::Pd_session : Session, Ram_allocator
|
||||
static constexpr unsigned CAP_QUOTA = 6 + 7;
|
||||
static constexpr size_t RAM_QUOTA = 24*1024*sizeof(long);
|
||||
|
||||
typedef Pd_session_client Client;
|
||||
using Client = Pd_session_client;
|
||||
|
||||
virtual ~Pd_session() { }
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <rm_session/rm_session.h>
|
||||
#include <base/capability.h>
|
||||
|
||||
namespace Genode { typedef Capability<Rm_session> Rm_session_capability; }
|
||||
namespace Genode { using Rm_session_capability = Capability<Rm_session>; }
|
||||
|
||||
#endif /* _INCLUDE__RM_SESSION__CAPABILITY_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <rom_session/rom_session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Rom_session> Rom_session_capability; }
|
||||
namespace Genode { using Rom_session_capability = Capability<Rom_session>; }
|
||||
|
||||
#endif /* _INCLUDE__ROM_SESSION__CAPABILITY_H_ */
|
||||
|
@ -27,7 +27,7 @@ namespace Genode {
|
||||
struct Rom_session;
|
||||
struct Rom_session_client;
|
||||
|
||||
typedef Capability<Rom_dataspace> Rom_dataspace_capability;
|
||||
using Rom_dataspace_capability = Capability<Rom_dataspace>;
|
||||
}
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ struct Genode::Rom_session : Session
|
||||
static constexpr unsigned CAP_QUOTA = 3;
|
||||
static constexpr size_t RAM_QUOTA = 6*1024;
|
||||
|
||||
typedef Rom_session_client Client;
|
||||
using Client = Rom_session_client;
|
||||
|
||||
virtual ~Rom_session() { }
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <root/root.h>
|
||||
|
||||
namespace Genode { typedef Capability<Root> Root_capability; }
|
||||
namespace Genode { using Root_capability = Capability<Root>; }
|
||||
|
||||
#endif /* _INCLUDE__ROOT__CAPABILITY_H_ */
|
||||
|
@ -29,8 +29,8 @@ namespace Genode {
|
||||
|
||||
struct Genode::Root
|
||||
{
|
||||
typedef Rpc_in_buffer<160> Session_args;
|
||||
typedef Rpc_in_buffer<160> Upgrade_args;
|
||||
using Session_args = Rpc_in_buffer<160>;
|
||||
using Upgrade_args = Rpc_in_buffer<160>;
|
||||
|
||||
virtual ~Root() { }
|
||||
|
||||
@ -84,7 +84,7 @@ struct Genode::Root
|
||||
template <typename SESSION_TYPE>
|
||||
struct Genode::Typed_root : Root
|
||||
{
|
||||
typedef SESSION_TYPE Session_type;
|
||||
using Session_type = SESSION_TYPE;
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__ROOT__ROOT_H_ */
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <session/session.h>
|
||||
|
||||
namespace Genode { typedef Capability<Session> Session_capability; }
|
||||
namespace Genode { using Session_capability = Capability<Session>; }
|
||||
|
||||
#endif /* _INCLUDE__SESSION__CAPABILITY_H_ */
|
||||
|
@ -51,7 +51,7 @@ struct Genode::Session
|
||||
|
||||
struct Diag { bool enabled; };
|
||||
|
||||
typedef Session_label Label;
|
||||
using Label = Session_label;
|
||||
|
||||
/*
|
||||
* Each session interface must implement the class function 'service_name'
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint64_t Timestamp;
|
||||
using Timestamp = uint64_t;
|
||||
|
||||
inline Timestamp timestamp()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint32_t Timestamp;
|
||||
using Timestamp = uint32_t;
|
||||
|
||||
inline Timestamp timestamp()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint32_t Timestamp;
|
||||
using Timestamp = uint32_t;
|
||||
|
||||
inline Timestamp timestamp()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint32_t Timestamp;
|
||||
using Timestamp = uint32_t;
|
||||
|
||||
inline Timestamp timestamp()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint64_t Timestamp;
|
||||
using Timestamp = uint64_t;
|
||||
|
||||
inline Timestamp timestamp()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
|
||||
typedef uint64_t Timestamp;
|
||||
using Timestamp = uint64_t;
|
||||
|
||||
inline Timestamp timestamp() __attribute((always_inline));
|
||||
inline Timestamp timestamp()
|
||||
|
@ -17,6 +17,6 @@
|
||||
#include <base/capability.h>
|
||||
#include <timer_session/timer_session.h>
|
||||
|
||||
namespace Timer { typedef Genode::Capability<Session> Session_capability; }
|
||||
namespace Timer { using Session_capability = Genode::Capability<Session>; }
|
||||
|
||||
#endif /* _INCLUDE__TIMER_SESSION__CAPABILITY_H_ */
|
||||
|
@ -29,7 +29,7 @@ namespace Timer {
|
||||
|
||||
struct Timer::Session : Genode::Session
|
||||
{
|
||||
typedef Genode::Signal_context_capability Signal_context_capability;
|
||||
using Signal_context_capability = Genode::Signal_context_capability;
|
||||
|
||||
/**
|
||||
* \noapi
|
||||
|
@ -44,7 +44,7 @@ class Genode::Arg
|
||||
*
|
||||
* Argument-string tokens accept C-style identifiers.
|
||||
*/
|
||||
typedef ::Genode::Token<Scanner_policy_identifier_with_underline> Token;
|
||||
using Token = ::Genode::Token<Scanner_policy_identifier_with_underline>;
|
||||
|
||||
friend class Arg_string;
|
||||
|
||||
@ -202,7 +202,7 @@ class Genode::Arg
|
||||
|
||||
class Genode::Arg_string
|
||||
{
|
||||
typedef Arg::Token Token;
|
||||
using Token = Arg::Token;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -67,7 +67,7 @@ class Genode::Avl_node_base : Noncopyable
|
||||
|
||||
public:
|
||||
|
||||
typedef bool Side;
|
||||
using Side = bool;
|
||||
|
||||
enum { LEFT = false, RIGHT = true };
|
||||
|
||||
|
@ -22,22 +22,22 @@ namespace Genode {
|
||||
** Reference and non-reference types **
|
||||
***************************************/
|
||||
|
||||
template <typename T> struct Reference { typedef T& Type; };
|
||||
template <typename T> struct Reference<T*> { typedef T* Type; };
|
||||
template <typename T> struct Reference<T&> { typedef T& Type; };
|
||||
template <typename T> struct Reference { using Type = T&; };
|
||||
template <typename T> struct Reference<T*> { using Type = T*; };
|
||||
template <typename T> struct Reference<T&> { using Type = T&; };
|
||||
|
||||
template <typename T> struct Non_reference { typedef T Type; };
|
||||
template <typename T> struct Non_reference<T*> { typedef T Type; };
|
||||
template <typename T> struct Non_reference<T&> { typedef T Type; };
|
||||
template <typename T> struct Non_reference { using Type = T; };
|
||||
template <typename T> struct Non_reference<T*> { using Type = T; };
|
||||
template <typename T> struct Non_reference<T&> { using Type = T; };
|
||||
|
||||
template <typename T> struct Non_const { typedef T Type; };
|
||||
template <typename T> struct Non_const<T const> { typedef T Type; };
|
||||
template <typename T> struct Non_const { using Type = T; };
|
||||
template <typename T> struct Non_const<T const> { using Type = T; };
|
||||
|
||||
/**
|
||||
* Determine plain-old-data type corresponding to type 'T'
|
||||
*/
|
||||
template <typename T> struct Pod {
|
||||
typedef typename Non_const<typename Non_reference<T>::Type>::Type Type; };
|
||||
using Type = typename Non_const<typename Non_reference<T>::Type>::Type; };
|
||||
|
||||
} /* namespace Trait */
|
||||
|
||||
@ -80,8 +80,8 @@ namespace Genode {
|
||||
template <typename HEAD, typename TAIL>
|
||||
struct Type_tuple
|
||||
{
|
||||
typedef HEAD Head;
|
||||
typedef TAIL Tail;
|
||||
using Head = HEAD;
|
||||
using Tail = TAIL;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -91,7 +91,7 @@ namespace Genode {
|
||||
struct Type_list;
|
||||
|
||||
template <>
|
||||
struct Type_list<> { typedef Empty Head; };
|
||||
struct Type_list<> { using Head = Empty; };
|
||||
|
||||
template <typename T>
|
||||
struct Type_list<T> : Type_tuple<T, Empty> { };
|
||||
@ -136,18 +136,18 @@ namespace Genode {
|
||||
class Append
|
||||
{
|
||||
/* pass appendix towards the end of the typelist */
|
||||
typedef typename Append<typename TL::Tail, APPENDIX>::Type _Tail;
|
||||
using _Tail = typename Append<typename TL::Tail, APPENDIX>::Type;
|
||||
|
||||
public:
|
||||
|
||||
/* keep head, replace tail */
|
||||
typedef Type_tuple<typename TL::Head, _Tail> Type;
|
||||
using Type = Type_tuple<typename TL::Head, _Tail>;
|
||||
};
|
||||
|
||||
|
||||
/* replace end of type list ('Empty' type) with appendix */
|
||||
template <typename APPENDIX>
|
||||
struct Append<Empty, APPENDIX> { typedef APPENDIX Type; };
|
||||
struct Append<Empty, APPENDIX> { using Type = APPENDIX; };
|
||||
|
||||
|
||||
/**
|
||||
@ -155,17 +155,17 @@ namespace Genode {
|
||||
*/
|
||||
template <typename TL, unsigned I>
|
||||
struct Type_at {
|
||||
typedef typename Type_at<typename TL::Tail, I - 1>::Type Type; };
|
||||
using Type = typename Type_at<typename TL::Tail, I - 1>::Type; };
|
||||
|
||||
/* end recursion if we reached the type */
|
||||
template <typename TL>
|
||||
struct Type_at<TL, 0U> { typedef typename TL::Head Type; };
|
||||
struct Type_at<TL, 0U> { using Type = typename TL::Head; };
|
||||
|
||||
/* end recursion at the end of type list */
|
||||
template <unsigned I> struct Type_at<Empty, I> { typedef void Type; };
|
||||
template <unsigned I> struct Type_at<Empty, I> { using Type = void; };
|
||||
|
||||
/* resolve ambiguous specializations */
|
||||
template <> struct Type_at<Empty, 0> { typedef void Type; };
|
||||
template <> struct Type_at<Empty, 0> { using Type = void; };
|
||||
|
||||
|
||||
/**
|
||||
@ -300,12 +300,12 @@ namespace Genode {
|
||||
template <typename HEAD, typename TAIL>
|
||||
struct Pod_tuple
|
||||
{
|
||||
typedef typename Trait::Pod<HEAD>::Type Stored_head;
|
||||
using Stored_head = typename Trait::Pod<HEAD>::Type;
|
||||
Stored_head _1;
|
||||
TAIL _2;
|
||||
|
||||
typedef HEAD Head;
|
||||
typedef TAIL Tail;
|
||||
using Head = HEAD;
|
||||
using Tail = TAIL;
|
||||
|
||||
/**
|
||||
* Accessor for requesting the data reference to '_1'
|
||||
@ -324,12 +324,12 @@ namespace Genode {
|
||||
template <typename HEAD, typename TAIL>
|
||||
struct Pod_tuple<HEAD *, TAIL>
|
||||
{
|
||||
typedef typename Trait::Non_reference<HEAD>::Type Stored_head;
|
||||
using Stored_head = typename Trait::Non_reference<HEAD>::Type;
|
||||
Stored_head _1;
|
||||
TAIL _2;
|
||||
|
||||
typedef HEAD* Head;
|
||||
typedef TAIL Tail;
|
||||
using Head = HEAD*;
|
||||
using Tail = TAIL;
|
||||
|
||||
HEAD *get() { return &_1; }
|
||||
};
|
||||
@ -355,35 +355,35 @@ namespace Genode {
|
||||
|
||||
template <>
|
||||
struct Ref_args<Void> {
|
||||
typedef Empty Type; };
|
||||
using Type = Empty; };
|
||||
|
||||
template <typename T1>
|
||||
struct Ref_args<T1, Void> {
|
||||
typedef Ref_tuple<T1, Empty> Type; };
|
||||
using Type = Ref_tuple<T1, Empty>; };
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct Ref_args<T1, T2, Void> {
|
||||
typedef Ref_tuple_3<T1, T2, Empty> Type; };
|
||||
using Type = Ref_tuple_3<T1, T2, Empty>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
struct Ref_args<T1, T2, T3, Void> {
|
||||
typedef Ref_tuple_4<T1, T2, T3, Empty> Type; };
|
||||
using Type = Ref_tuple_4<T1, T2, T3, Empty>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
struct Ref_args<T1, T2, T3, T4, Void> {
|
||||
typedef Ref_tuple_5<T1, T2, T3, T4, Empty> Type; };
|
||||
using Type = Ref_tuple_5<T1, T2, T3, T4, Empty>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
struct Ref_args<T1, T2, T3, T4, T5, Void> {
|
||||
typedef Ref_tuple_6<T1, T2, T3, T4, T5, Empty> Type; };
|
||||
using Type = Ref_tuple_6<T1, T2, T3, T4, T5, Empty>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
|
||||
struct Ref_args<T1, T2, T3, T4, T5, T6, Void> {
|
||||
typedef Ref_tuple_7<T1, T2, T3, T4, T5, T6, Empty> Type; };
|
||||
using Type = Ref_tuple_7<T1, T2, T3, T4, T5, T6, Empty>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
|
||||
struct Ref_args<T1, T2, T3, T4, T5, T6, T7, Void> {
|
||||
typedef Ref_tuple_8<T1, T2, T3, T4, T5, T6, T7, Empty> Type; };
|
||||
using Type = Ref_tuple_8<T1, T2, T3, T4, T5, T6, T7, Empty>; };
|
||||
|
||||
|
||||
/**
|
||||
@ -398,28 +398,28 @@ namespace Genode {
|
||||
struct Pod_args;
|
||||
|
||||
template <>
|
||||
struct Pod_args<Void> { typedef Empty Type; };
|
||||
struct Pod_args<Void> { using Type = Empty; };
|
||||
|
||||
template <typename T1>
|
||||
struct Pod_args<T1, Void> { typedef Pod_tuple<T1, Empty> Type; };
|
||||
struct Pod_args<T1, Void> { using Type = Pod_tuple<T1, Empty>; };
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct Pod_args<T1, T2, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, Void>::Type>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
struct Pod_args<T1, T2, T3, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, T3, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, T3, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, T3, Void>::Type>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
struct Pod_args<T1, T2, T3, T4, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, T3, T4, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, T3, T4, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, T3, T4, Void>::Type>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
struct Pod_args<T1, T2, T3, T4, T5, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, T3, T4, T5, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, Void>::Type>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
|
||||
struct Pod_args<T1, T2, T3, T4, T5, T6, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, T6, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, T3, T4, T5, T6, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, T6, Void>::Type>; };
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
|
||||
struct Pod_args<T1, T2, T3, T4, T5, T6, T7, Void> { typedef Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, T6, T7, Void>::Type> Type; };
|
||||
struct Pod_args<T1, T2, T3, T4, T5, T6, T7, Void> { using Type = Pod_tuple<T1, typename Pod_args<T2, T3, T4, T5, T6, T7, Void>::Type>; };
|
||||
|
||||
|
||||
/**
|
||||
@ -619,8 +619,8 @@ namespace Genode {
|
||||
* Make class unique for different template arguments. The types
|
||||
* are never used.
|
||||
*/
|
||||
typedef T1 _T1;
|
||||
typedef T2 _T2;
|
||||
using _T1 = T1;
|
||||
using _T2 = T2;
|
||||
|
||||
/* prevent zero initialization of objects */
|
||||
Overload_selector() { }
|
||||
|
@ -46,7 +46,7 @@ namespace Genode { namespace Trait {
|
||||
|
||||
template <> struct Uint_width<8>
|
||||
{
|
||||
typedef uint8_t Type;
|
||||
using Type = uint8_t;
|
||||
enum { WIDTH_LOG2 = 3 };
|
||||
|
||||
/**
|
||||
@ -57,19 +57,19 @@ namespace Genode { namespace Trait {
|
||||
|
||||
template <> struct Uint_width<16> : Uint_width<8>
|
||||
{
|
||||
typedef uint16_t Type;
|
||||
using Type = uint16_t;
|
||||
enum { WIDTH_LOG2 = 4 };
|
||||
};
|
||||
|
||||
template <> struct Uint_width<32> : Uint_width<16>
|
||||
{
|
||||
typedef uint32_t Type;
|
||||
using Type = uint32_t;
|
||||
enum { WIDTH_LOG2 = 5 };
|
||||
};
|
||||
|
||||
template <> struct Uint_width<64> : Uint_width<32>
|
||||
{
|
||||
typedef uint64_t Type;
|
||||
using Type = uint64_t;
|
||||
enum { WIDTH_LOG2 = 6 };
|
||||
};
|
||||
|
||||
@ -111,7 +111,7 @@ struct Genode::Register
|
||||
static constexpr size_t ACCESS_WIDTH_LOG2 = Trait::Uint_width<ACCESS_WIDTH>::WIDTH_LOG2;
|
||||
static constexpr size_t BITFIELD_WIDTH = ACCESS_WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
using access_t = typename Trait::Uint_width<ACCESS_WIDTH>::Type;
|
||||
|
||||
/**
|
||||
* A bitregion within a register
|
||||
@ -133,9 +133,8 @@ struct Genode::Register
|
||||
static constexpr size_t WIDTH = _WIDTH;
|
||||
static constexpr size_t BITFIELD_WIDTH = WIDTH;
|
||||
|
||||
typedef typename
|
||||
Trait::Uint_width<Trait::Raise_to_uint_width<WIDTH>::WIDTH>::Type
|
||||
bitfield_t;
|
||||
using bitfield_t =
|
||||
typename Trait::Uint_width<Trait::Raise_to_uint_width<WIDTH>::WIDTH>::Type;
|
||||
|
||||
/**
|
||||
* Get an unshifted mask of this field
|
||||
@ -163,7 +162,7 @@ struct Genode::Register
|
||||
/**
|
||||
* Back reference to containing register
|
||||
*/
|
||||
typedef Register<ACCESS_WIDTH> Compound_reg;
|
||||
using Compound_reg = Register<ACCESS_WIDTH>;
|
||||
|
||||
/**
|
||||
* Get register with this bitfield set to 'value' and rest left 0
|
||||
@ -217,16 +216,16 @@ struct Genode::Register
|
||||
template <typename _BITS_0, typename _BITS_1>
|
||||
struct Genode::Bitset_2
|
||||
{
|
||||
typedef _BITS_0 Bits_0;
|
||||
typedef _BITS_1 Bits_1;
|
||||
using Bits_0 = _BITS_0;
|
||||
using Bits_1 = _BITS_1;
|
||||
|
||||
static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH;
|
||||
static constexpr size_t BITFIELD_WIDTH = WIDTH;
|
||||
static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
typedef Bitset_2<Bits_0, Bits_1> Bitset_2_base;
|
||||
using access_t = typename Trait::Uint_width<ACCESS_WIDTH>::Type;
|
||||
using Bitset_2_base = Bitset_2<Bits_0, Bits_1>;
|
||||
|
||||
/**
|
||||
* Convert bitset value to register representation
|
||||
@ -284,10 +283,10 @@ struct Genode::Bitset_2
|
||||
template <typename _BITS_0, typename _BITS_1, typename _BITS_2>
|
||||
struct Genode::Bitset_3
|
||||
{
|
||||
typedef _BITS_0 Bits_0;
|
||||
typedef _BITS_1 Bits_1;
|
||||
typedef _BITS_2 Bits_2;
|
||||
typedef Bitset_2<Bits_0, Bits_1> Bits_0_1;
|
||||
using Bits_0 = _BITS_0;
|
||||
using Bits_1 = _BITS_1;
|
||||
using Bits_2 = _BITS_2;
|
||||
using Bits_0_1 = Bitset_2<Bits_0, Bits_1>;
|
||||
|
||||
static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH +
|
||||
@ -295,8 +294,8 @@ struct Genode::Bitset_3
|
||||
static constexpr size_t BITFIELD_WIDTH = WIDTH;
|
||||
static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
typedef Bitset_3<Bits_0, Bits_1, Bits_2> Bitset_3_base;
|
||||
using access_t = typename Trait::Uint_width<ACCESS_WIDTH>::Type;
|
||||
using Bitset_3_base = Bitset_3<Bits_0, Bits_1, Bits_2>;
|
||||
|
||||
/**
|
||||
* Convert bitset value to register representation
|
||||
|
@ -165,13 +165,13 @@ class Genode::Register_set : public Register_set_base
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename T::access_t access_t;
|
||||
using access_t = typename T::access_t;
|
||||
|
||||
access_t const _reference_val;
|
||||
|
||||
public:
|
||||
|
||||
typedef T Object;
|
||||
using Object = T;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -235,11 +235,8 @@ class Genode::Register_set : public Register_set_base
|
||||
* that solely must not be redefined by the deriving
|
||||
* class to ensure correct template selection.
|
||||
*/
|
||||
typedef Register<_OFFSET, _ACCESS_WIDTH, _STRICT_WRITE>
|
||||
Register_base;
|
||||
|
||||
typedef typename Genode::Register<_ACCESS_WIDTH>::access_t
|
||||
access_t;
|
||||
using Register_base = Register<_OFFSET, _ACCESS_WIDTH, _STRICT_WRITE>;
|
||||
using access_t = typename Genode::Register<_ACCESS_WIDTH>::access_t;
|
||||
|
||||
static_assert(OFFSET + sizeof(access_t) <= REGISTER_SET_SIZE);
|
||||
|
||||
@ -260,13 +257,11 @@ class Genode::Register_set : public Register_set_base
|
||||
public Conditions<Bitfield<_SHIFT, _WIDTH> >
|
||||
{
|
||||
/* analogous to 'Register_set::Register::Register_base' */
|
||||
typedef Bitfield<_SHIFT, _WIDTH> Bitfield_base;
|
||||
using Bitfield_base = Bitfield<_SHIFT, _WIDTH>;
|
||||
|
||||
/* back reference to containing register */
|
||||
typedef Register<_OFFSET, _ACCESS_WIDTH, _STRICT_WRITE>
|
||||
Compound_reg;
|
||||
|
||||
typedef Compound_reg::access_t access_t;
|
||||
using Compound_reg = Register<_OFFSET, _ACCESS_WIDTH, _STRICT_WRITE>;
|
||||
using access_t = Compound_reg::access_t;
|
||||
};
|
||||
};
|
||||
|
||||
@ -306,8 +301,8 @@ class Genode::Register_set : public Register_set_base
|
||||
struct Register_array : public Register<_OFFSET, _ACCESS_WIDTH,
|
||||
_STRICT_WRITE>
|
||||
{
|
||||
typedef typename Trait::Uint_width<_ACCESS_WIDTH>::
|
||||
template Divisor<_ITEM_WIDTH> Item;
|
||||
using Item = typename Trait::Uint_width<_ACCESS_WIDTH>
|
||||
::template Divisor<_ITEM_WIDTH>;
|
||||
|
||||
enum {
|
||||
STRICT_WRITE = _STRICT_WRITE,
|
||||
@ -322,12 +317,11 @@ class Genode::Register_set : public Register_set_base
|
||||
};
|
||||
|
||||
/* analogous to 'Register_set::Register::Register_base' */
|
||||
typedef Register_array<OFFSET, ACCESS_WIDTH, ITEMS,
|
||||
ITEM_WIDTH, STRICT_WRITE>
|
||||
Register_array_base;
|
||||
using Register_array_base = Register_array<OFFSET, ACCESS_WIDTH, ITEMS,
|
||||
ITEM_WIDTH, STRICT_WRITE>;
|
||||
|
||||
typedef typename Register<OFFSET, ACCESS_WIDTH, STRICT_WRITE>::
|
||||
access_t access_t;
|
||||
using access_t =
|
||||
typename Register<OFFSET, ACCESS_WIDTH, STRICT_WRITE>:: access_t;
|
||||
|
||||
/**
|
||||
* A bit region within a register array item
|
||||
@ -343,12 +337,11 @@ class Genode::Register_set : public Register_set_base
|
||||
template Bitfield<_SHIFT, _SIZE>
|
||||
{
|
||||
/* analogous to 'Register_set::Register::Register_base' */
|
||||
typedef Bitfield<_SHIFT, _SIZE> Array_bitfield_base;
|
||||
using Array_bitfield_base = Bitfield<_SHIFT, _SIZE>;
|
||||
|
||||
/* back reference to containing register array */
|
||||
typedef Register_array<OFFSET, ACCESS_WIDTH, ITEMS,
|
||||
ITEM_WIDTH, STRICT_WRITE>
|
||||
Compound_array;
|
||||
using Compound_array = Register_array<OFFSET, ACCESS_WIDTH, ITEMS,
|
||||
ITEM_WIDTH, STRICT_WRITE>;
|
||||
};
|
||||
|
||||
|
||||
@ -406,8 +399,8 @@ class Genode::Register_set : public Register_set_base
|
||||
template <typename T>
|
||||
inline typename T::Register_base::access_t read() const
|
||||
{
|
||||
typedef typename T::Register_base Register;
|
||||
typedef typename Register::access_t access_t;
|
||||
using Register = typename T::Register_base;
|
||||
using access_t = typename Register::access_t;
|
||||
return Plain_access::read<access_t>(_plain_access,
|
||||
Register::OFFSET);
|
||||
}
|
||||
@ -419,8 +412,8 @@ class Genode::Register_set : public Register_set_base
|
||||
inline void
|
||||
write(typename T::Register_base::access_t const value)
|
||||
{
|
||||
typedef typename T::Register_base Register;
|
||||
typedef typename Register::access_t access_t;
|
||||
using Register = typename T::Register_base;
|
||||
using access_t = typename Register::access_t;
|
||||
Plain_access::write<access_t>(_plain_access, Register::OFFSET,
|
||||
value);
|
||||
}
|
||||
@ -436,9 +429,9 @@ class Genode::Register_set : public Register_set_base
|
||||
inline typename T::Bitfield_base::bitfield_t
|
||||
read() const
|
||||
{
|
||||
typedef typename T::Bitfield_base Bitfield;
|
||||
typedef typename Bitfield::Compound_reg Register;
|
||||
typedef typename Register::access_t access_t;
|
||||
using Bitfield = typename T::Bitfield_base;
|
||||
using Register = typename Bitfield::Compound_reg;
|
||||
using access_t = typename Register::access_t;
|
||||
return
|
||||
Bitfield::get(Plain_access::read<access_t>(_plain_access,
|
||||
Register::OFFSET));
|
||||
@ -453,9 +446,9 @@ class Genode::Register_set : public Register_set_base
|
||||
inline void
|
||||
write(typename T::Bitfield_base::Compound_reg::access_t const value)
|
||||
{
|
||||
typedef typename T::Bitfield_base Bitfield;
|
||||
typedef typename Bitfield::Compound_reg Register;
|
||||
typedef typename Register::access_t access_t;
|
||||
using Bitfield = typename T::Bitfield_base;
|
||||
using Register = typename Bitfield::Compound_reg;
|
||||
using access_t = typename Register::access_t;
|
||||
|
||||
/* initialize the pattern written finally to the register */
|
||||
access_t write_value;
|
||||
@ -488,8 +481,8 @@ class Genode::Register_set : public Register_set_base
|
||||
inline typename T::Register_array_base::access_t
|
||||
read(unsigned long const index) const
|
||||
{
|
||||
typedef typename T::Register_array_base Array;
|
||||
typedef typename Array::access_t access_t;
|
||||
using Array = typename T::Register_array_base;
|
||||
using access_t = typename Array::access_t;
|
||||
|
||||
/* reads outside the array return 0 */
|
||||
if (index > Array::MAX_INDEX) return 0;
|
||||
@ -519,8 +512,8 @@ class Genode::Register_set : public Register_set_base
|
||||
write(typename T::Register_array_base::access_t const value,
|
||||
unsigned long const index)
|
||||
{
|
||||
typedef typename T::Register_array_base Array;
|
||||
typedef typename Array::access_t access_t;
|
||||
using Array = typename T::Register_array_base;
|
||||
using access_t = typename Array::access_t;
|
||||
|
||||
/* ignore writes outside the array */
|
||||
if (index > Array::MAX_INDEX) return;
|
||||
@ -569,8 +562,8 @@ class Genode::Register_set : public Register_set_base
|
||||
inline typename T::Array_bitfield_base::bitfield_t
|
||||
read(unsigned long const index) const
|
||||
{
|
||||
typedef typename T::Array_bitfield_base Bitfield;
|
||||
typedef typename Bitfield::Compound_array Array;
|
||||
using Bitfield = typename T::Array_bitfield_base;
|
||||
using Array = typename Bitfield::Compound_array;
|
||||
return Bitfield::get(read<Array>(index));
|
||||
}
|
||||
|
||||
@ -585,9 +578,9 @@ class Genode::Register_set : public Register_set_base
|
||||
write(typename T::Array_bitfield_base::Compound_array::access_t const value,
|
||||
long unsigned const index)
|
||||
{
|
||||
typedef typename T::Array_bitfield_base Bitfield;
|
||||
typedef typename Bitfield::Compound_array Array;
|
||||
typedef typename Array::access_t access_t;
|
||||
using Bitfield = typename T::Array_bitfield_base;
|
||||
using Array = typename Bitfield::Compound_array;
|
||||
using access_t = typename Array::access_t;
|
||||
|
||||
/* initialize the pattern written finally to the register */
|
||||
access_t write_value;
|
||||
@ -617,9 +610,9 @@ class Genode::Register_set : public Register_set_base
|
||||
template <typename T>
|
||||
inline typename T::Bitset_2_base::access_t const read()
|
||||
{
|
||||
typedef typename T::Bitset_2_base::Bits_0 Bits_0;
|
||||
typedef typename T::Bitset_2_base::Bits_1 Bits_1;
|
||||
typedef typename T::Bitset_2_base::access_t access_t;
|
||||
using Bits_0 = typename T::Bitset_2_base::Bits_0;
|
||||
using Bits_1 = typename T::Bitset_2_base::Bits_1;
|
||||
using access_t = typename T::Bitset_2_base::access_t;
|
||||
enum { V1_SHIFT = Bits_0::BITFIELD_WIDTH };
|
||||
access_t const v0 = read<Bits_0>();
|
||||
access_t const v1 = read<Bits_1>();
|
||||
@ -634,8 +627,8 @@ class Genode::Register_set : public Register_set_base
|
||||
template <typename T>
|
||||
inline void write(typename T::Bitset_2_base::access_t v)
|
||||
{
|
||||
typedef typename T::Bitset_2_base::Bits_0 Bits_0;
|
||||
typedef typename T::Bitset_2_base::Bits_1 Bits_1;
|
||||
using Bits_0 = typename T::Bitset_2_base::Bits_0;
|
||||
using Bits_1 = typename T::Bitset_2_base::Bits_1;
|
||||
write<Bits_0>(typename Bits_0::access_t(v));
|
||||
write<Bits_1>(typename Bits_1::access_t(v >> Bits_0::BITFIELD_WIDTH));
|
||||
}
|
||||
@ -646,10 +639,10 @@ class Genode::Register_set : public Register_set_base
|
||||
template <typename T>
|
||||
inline typename T::Bitset_3_base::access_t const read()
|
||||
{
|
||||
typedef typename T::Bitset_3_base::Bits_0 Bits_0;
|
||||
typedef typename T::Bitset_3_base::Bits_1 Bits_1;
|
||||
typedef typename T::Bitset_3_base::Bits_2 Bits_2;
|
||||
typedef typename T::Bitset_3_base::access_t access_t;
|
||||
using Bits_0 = typename T::Bitset_3_base::Bits_0;
|
||||
using Bits_1 = typename T::Bitset_3_base::Bits_1;
|
||||
using Bits_2 = typename T::Bitset_3_base::Bits_2;
|
||||
using access_t = typename T::Bitset_3_base::access_t;
|
||||
|
||||
static constexpr size_t BITS_0_WIDTH = Bits_0::BITFIELD_WIDTH;
|
||||
static constexpr size_t BITS_1_WIDTH = Bits_1::BITFIELD_WIDTH;
|
||||
@ -668,9 +661,9 @@ class Genode::Register_set : public Register_set_base
|
||||
template <typename T>
|
||||
inline void write(typename T::Bitset_3_base::access_t v)
|
||||
{
|
||||
typedef typename T::Bitset_3_base::Bits_0 Bits_0;
|
||||
typedef typename T::Bitset_3_base::Bits_1 Bits_1;
|
||||
typedef typename T::Bitset_3_base::Bits_2 Bits_2;
|
||||
using Bits_0 = typename T::Bitset_3_base::Bits_0;
|
||||
using Bits_1 = typename T::Bitset_3_base::Bits_1;
|
||||
using Bits_2 = typename T::Bitset_3_base::Bits_2;
|
||||
write<Bitset_2<Bits_0, Bits_1> >(typename Bitset_2<Bits_0, Bits_1>::access_t(v));
|
||||
write<Bits_2>(typename Bits_2::access_t(v >> (Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH)));
|
||||
|
@ -275,7 +275,7 @@ namespace Genode {
|
||||
__attribute((optimize("no-tree-loop-distribute-patterns")))
|
||||
inline void *memset(void *dst, uint8_t i, size_t size)
|
||||
{
|
||||
typedef unsigned long word_t;
|
||||
using word_t = unsigned long;
|
||||
|
||||
enum {
|
||||
LEN = sizeof(word_t),
|
||||
|
@ -50,7 +50,7 @@ class Genode::Xml_attribute
|
||||
/**
|
||||
* Define tokenizer that matches XML tags (with hyphens) as identifiers
|
||||
*/
|
||||
typedef ::Genode::Token<Scanner_policy_xml_identifier> Token;
|
||||
using Token = ::Genode::Token<Scanner_policy_xml_identifier>;
|
||||
|
||||
struct Tokens
|
||||
{
|
||||
@ -113,7 +113,7 @@ class Genode::Xml_attribute
|
||||
class Invalid_syntax : public Exception { };
|
||||
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
Name name() const {
|
||||
return Name(Cstring(_tokens.name.start(), _tokens.name.len())); }
|
||||
|
||||
@ -205,7 +205,7 @@ class Genode::Xml_node
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Xml_attribute::Token Token;
|
||||
using Token = Xml_attribute::Token;
|
||||
|
||||
/**
|
||||
* Forward declaration needed for befriending Tag with Xml_attribute
|
||||
@ -220,7 +220,7 @@ class Genode::Xml_node
|
||||
** Exception types **
|
||||
*********************/
|
||||
|
||||
typedef Xml_attribute::Invalid_syntax Invalid_syntax;
|
||||
using Invalid_syntax = Xml_attribute::Invalid_syntax;
|
||||
|
||||
class Nonexistent_sub_node : public Exception { };
|
||||
|
||||
@ -228,7 +228,7 @@ class Genode::Xml_node
|
||||
/**
|
||||
* Type definition for maintaining backward compatibility
|
||||
*/
|
||||
typedef Xml_attribute Attribute;
|
||||
using Attribute = Xml_attribute;
|
||||
|
||||
private:
|
||||
|
||||
@ -655,7 +655,7 @@ class Genode::Xml_node
|
||||
/**
|
||||
* Request type name of XML node as null-terminated string
|
||||
*/
|
||||
typedef String<64> Type;
|
||||
using Type = String<64>;
|
||||
Type type() const
|
||||
{
|
||||
Token name = _tags.start.name();
|
||||
|
@ -87,7 +87,7 @@ class Core::Account
|
||||
|
||||
public:
|
||||
|
||||
typedef typename Quota_guard<UNIT>::Limit_exceeded Limit_exceeded;
|
||||
using Limit_exceeded = typename Quota_guard<UNIT>::Limit_exceeded;
|
||||
|
||||
class Unrelated_account : Exception { };
|
||||
|
||||
|
@ -34,8 +34,8 @@ namespace Core {
|
||||
* We take the knowledge about the used backing-store allocator (sliced
|
||||
* heap) into account to make sure that slab blocks fill whole pages.
|
||||
*/
|
||||
typedef Tslab<Cpu_thread_component, get_page_size() - Sliced_heap::meta_data_size(), 2>
|
||||
Cpu_thread_allocator;
|
||||
using Cpu_thread_allocator =
|
||||
Tslab<Cpu_thread_component, get_page_size() - Sliced_heap::meta_data_size(), 2>;
|
||||
}
|
||||
|
||||
#endif /* _CORE__INCLUDE__CPU_THREAD_ALLOCATOR_H_ */
|
||||
|
@ -40,7 +40,7 @@ class Core::Cpu_thread_component : public Rpc_object<Cpu_thread>,
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Trace::Thread_name Thread_name;
|
||||
using Thread_name = Trace::Thread_name;
|
||||
|
||||
using Pd_threads = Pd_session_component::Threads;
|
||||
|
||||
|
@ -19,6 +19,6 @@
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { typedef Thread_state Pager_object_exception_state; }
|
||||
namespace Core { using Pager_object_exception_state = Thread_state; }
|
||||
|
||||
#endif /* _CORE__INCLUDE__PAGER_OBJECT_EXCEPTION_STATE_H_ */
|
||||
|
@ -122,8 +122,8 @@ class Core::Pd_session_component : public Session_object<Pd_session>
|
||||
|
||||
public:
|
||||
|
||||
typedef Ram_dataspace_factory::Phys_range Phys_range;
|
||||
typedef Ram_dataspace_factory::Virt_range Virt_range;
|
||||
using Phys_range = Ram_dataspace_factory::Phys_range;
|
||||
using Virt_range = Ram_dataspace_factory::Virt_range;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -32,7 +32,7 @@ class Core::Ram_dataspace_factory : public Ram_allocator,
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Range_allocator::Range Phys_range;
|
||||
using Phys_range = Range_allocator::Range;
|
||||
|
||||
static Phys_range any_phys_range() { return { 0UL, ~0UL }; }
|
||||
|
||||
|
@ -392,8 +392,7 @@ class Core::Region_map_component : private Weak_object<Region_map_component>,
|
||||
* Dimension slab allocator for regions such that backing store is
|
||||
* allocated at the granularity of pages.
|
||||
*/
|
||||
typedef Tslab<Rm_region_ref, get_page_size() - Sliced_heap::meta_data_size()>
|
||||
Ref_slab;
|
||||
using Ref_slab = Tslab<Rm_region_ref, get_page_size() - Sliced_heap::meta_data_size()>;
|
||||
|
||||
Allocator_avl_tpl<Rm_region> _map; /* region map for attach,
|
||||
detach, pagefaults */
|
||||
|
@ -29,7 +29,7 @@ namespace Core {
|
||||
class Signal_context_component;
|
||||
class Signal_source_component;
|
||||
|
||||
typedef Fifo<Signal_context_component> Signal_queue;
|
||||
using Signal_queue = Fifo<Signal_context_component>;
|
||||
|
||||
struct Signal_context_slab;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ class Core::Trace::Subject_registry
|
||||
{
|
||||
private:
|
||||
|
||||
typedef List<Subject> Subjects;
|
||||
using Subjects = List<Subject>;
|
||||
|
||||
Allocator &_md_alloc;
|
||||
Source_registry &_sources;
|
||||
|
@ -49,7 +49,7 @@ void Signal_receiver::_platform_finish_dissolve(Signal_context &) { }
|
||||
void Signal_receiver::unblock_signal_waiter(Rpc_entrypoint &) { ASSERT_NEVER_CALLED; }
|
||||
|
||||
|
||||
typedef Signal_context_capability Sigh_cap;
|
||||
using Sigh_cap = Signal_context_capability;
|
||||
|
||||
|
||||
Sigh_cap Signal_receiver::manage(Signal_context &) { ASSERT_NEVER_CALLED; }
|
||||
|
@ -82,7 +82,7 @@ class Genode::Capability_space_tpl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef CAP_DATA Data;
|
||||
using Data = CAP_DATA;
|
||||
|
||||
/**
|
||||
* Supplement Native_capability::Data with the meta data needed to
|
||||
|
@ -37,36 +37,36 @@ extern "C" {
|
||||
#include <base/stdint.h>
|
||||
|
||||
/* type for a 16-bit quantity. */
|
||||
typedef genode_uint16_t Elf32_Half;
|
||||
typedef genode_uint16_t Elf64_Half;
|
||||
using Elf32_Half = genode_uint16_t;
|
||||
using Elf64_Half = genode_uint16_t;
|
||||
|
||||
/* types for signed and unsigned 32-bit quantities */
|
||||
typedef genode_uint32_t Elf32_Word;
|
||||
typedef genode_int32_t Elf32_Sword;
|
||||
typedef genode_uint32_t Elf64_Word;
|
||||
typedef genode_int32_t Elf64_Sword;
|
||||
using Elf32_Word = genode_uint32_t;
|
||||
using Elf32_Sword = genode_int32_t;
|
||||
using Elf64_Word = genode_uint32_t;
|
||||
using Elf64_Sword = genode_int32_t;
|
||||
|
||||
/* types for signed and unsigned 64-bit quantities */
|
||||
typedef genode_uint64_t Elf32_Xword;
|
||||
typedef genode_int64_t Elf32_Sxword;
|
||||
typedef genode_uint64_t Elf64_Xword;
|
||||
typedef genode_int64_t Elf64_Sxword;
|
||||
using Elf32_Xword = genode_uint64_t;
|
||||
using Elf32_Sxword = genode_int64_t;
|
||||
using Elf64_Xword = genode_uint64_t;
|
||||
using Elf64_Sxword = genode_int64_t;
|
||||
|
||||
/* type of addresses */
|
||||
typedef genode_uint32_t Elf32_Addr;
|
||||
typedef genode_uint64_t Elf64_Addr;
|
||||
using Elf32_Addr = genode_uint32_t;
|
||||
using Elf64_Addr = genode_uint64_t;
|
||||
|
||||
/* type of file offsets */
|
||||
typedef genode_uint32_t Elf32_Off;
|
||||
typedef genode_uint64_t Elf64_Off;
|
||||
using Elf32_Off = genode_uint32_t;
|
||||
using Elf64_Off = genode_uint64_t;
|
||||
|
||||
/* type for section indices, which are 16-bit quantities */
|
||||
typedef genode_uint16_t Elf32_Section;
|
||||
typedef genode_uint16_t Elf64_Section;
|
||||
using Elf32_Section = genode_uint16_t;
|
||||
using Elf64_Section = genode_uint16_t;
|
||||
|
||||
/* type for version symbol information */
|
||||
typedef Elf32_Half Elf32_Versym;
|
||||
typedef Elf64_Half Elf64_Versym;
|
||||
using Elf32_Versym = Elf32_Half;
|
||||
using Elf64_Versym = Elf64_Half;
|
||||
|
||||
|
||||
/**
|
||||
@ -74,7 +74,7 @@ typedef Elf64_Half Elf64_Versym;
|
||||
*/
|
||||
enum { EI_NIDENT = 16 };
|
||||
|
||||
typedef struct
|
||||
struct Elf32_Ehdr
|
||||
{
|
||||
unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */
|
||||
Elf32_Half e_type; /* Object file type */
|
||||
@ -90,9 +90,9 @@ typedef struct
|
||||
Elf32_Half e_shentsize; /* Section header table entry size */
|
||||
Elf32_Half e_shnum; /* Section header table entry count */
|
||||
Elf32_Half e_shstrndx; /* Section header string table index */
|
||||
} Elf32_Ehdr;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
struct Elf64_Ehdr
|
||||
{
|
||||
unsigned char e_ident[EI_NIDENT]; /* magic number and other info */
|
||||
Elf64_Half e_type; /* object file type */
|
||||
@ -108,7 +108,7 @@ typedef struct
|
||||
Elf64_Half e_shentsize; /* section header table entry size */
|
||||
Elf64_Half e_shnum; /* section header table entry count */
|
||||
Elf64_Half e_shstrndx; /* section header string table index */
|
||||
} Elf64_Ehdr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fields in the e_ident array. The EI_* macros are indices into the
|
||||
@ -183,7 +183,7 @@ enum {
|
||||
/**
|
||||
* Program segment header
|
||||
*/
|
||||
typedef struct
|
||||
struct Elf32_Phdr
|
||||
{
|
||||
Elf32_Word p_type; /* segment type */
|
||||
Elf32_Off p_offset; /* segment file offset */
|
||||
@ -193,9 +193,9 @@ typedef struct
|
||||
Elf32_Word p_memsz; /* segment size in memory */
|
||||
Elf32_Word p_flags; /* segment flags */
|
||||
Elf32_Word p_align; /* segment alignment */
|
||||
} Elf32_Phdr;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
struct Elf64_Phdr
|
||||
{
|
||||
Elf64_Word p_type; /* segment type */
|
||||
Elf64_Word p_flags; /* segment flags */
|
||||
@ -205,7 +205,7 @@ typedef struct
|
||||
Elf64_Xword p_filesz; /* segment size in file */
|
||||
Elf64_Xword p_memsz; /* segment size in memory */
|
||||
Elf64_Xword p_align; /* segment alignment */
|
||||
} Elf64_Phdr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Legal values for p_type (segment type)
|
||||
@ -242,12 +242,12 @@ enum {
|
||||
*/
|
||||
|
||||
#ifdef _LP64
|
||||
typedef Elf64_Ehdr Elf_Ehdr;
|
||||
typedef Elf64_Phdr Elf_Phdr;
|
||||
using Elf_Ehdr = Elf64_Ehdr;
|
||||
using Elf_Phdr = Elf64_Phdr;
|
||||
#define ELFCLASS ELFCLASS64
|
||||
#else
|
||||
typedef Elf32_Ehdr Elf_Ehdr;
|
||||
typedef Elf32_Phdr Elf_Phdr;
|
||||
using Elf_Ehdr = Elf32_Ehdr;
|
||||
using Elf_Phdr = Elf32_Phdr;
|
||||
#define ELFCLASS ELFCLASS32
|
||||
#endif /* _LP64 */
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user