mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
@ -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();
|
||||
|
Reference in New Issue
Block a user