mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 14:18:27 +00:00
@ -119,7 +119,7 @@ struct Test::Test_base : private Genode::Fifo<Test_base>::Element
|
||||
|
||||
Xml_node const _node;
|
||||
|
||||
typedef Block::block_number_t block_number_t;
|
||||
using block_number_t = Block::block_number_t;
|
||||
|
||||
bool const _verbose;
|
||||
size_t const _io_buffer;
|
||||
@ -134,7 +134,7 @@ struct Test::Test_base : private Genode::Fifo<Test_base>::Element
|
||||
Allocator_avl _block_alloc { &_alloc };
|
||||
|
||||
struct Job;
|
||||
typedef Block::Connection<Job> Block_connection;
|
||||
using Block_connection = Block::Connection<Job>;
|
||||
|
||||
Constructible<Block_connection> _block { };
|
||||
|
||||
|
@ -32,7 +32,7 @@ struct Test::Replay : Test_base
|
||||
|
||||
auto op_type = [&] ()
|
||||
{
|
||||
typedef String<8> Type;
|
||||
using Type = String<8>;
|
||||
|
||||
if (request.attribute_value("type", Type()) == "read")
|
||||
return Block::Operation::Type::READ;
|
||||
|
@ -48,7 +48,7 @@ struct Cpu_burn : Thread
|
||||
|
||||
struct Cpu_burner
|
||||
{
|
||||
typedef List<List_element<Cpu_burn> > Thread_list;
|
||||
using Thread_list = List<List_element<Cpu_burn> >;
|
||||
|
||||
Env &_env;
|
||||
Heap _heap { _env.ram(), _env.rm() };
|
||||
|
@ -74,7 +74,7 @@ struct Dummy::Log_service
|
||||
Genode::String<16> const pattern("\033[0m\n");
|
||||
for (char const *s = string.string(); s[n] && pattern != s + n; n++);
|
||||
|
||||
typedef Genode::String<100> Message;
|
||||
using Message = Genode::String<100>;
|
||||
Message const message("[", _label, "] ", Cstring(string.string(), n));
|
||||
log(message);
|
||||
}
|
||||
@ -144,7 +144,7 @@ struct Dummy::Log_connections
|
||||
|
||||
Sliced_heap _heap { _env.ram(), _env.rm() };
|
||||
|
||||
typedef Registered<Log_connection> Connection;
|
||||
using Connection = Registered<Log_connection>;
|
||||
|
||||
Registry<Connection> _connections { };
|
||||
|
||||
@ -303,7 +303,7 @@ struct Dummy::Main
|
||||
|
||||
unsigned _config_cnt = 0;
|
||||
|
||||
typedef String<50> Version;
|
||||
using Version = String<50>;
|
||||
|
||||
Version _config_version { };
|
||||
|
||||
|
@ -65,7 +65,7 @@ struct Global_keys_handler::Main
|
||||
{
|
||||
Registry<Bool_state>::Element _element;
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
Name const _name;
|
||||
|
||||
@ -86,7 +86,7 @@ struct Global_keys_handler::Main
|
||||
if (event.attribute_value("bool", Bool_state::Name()) != _name)
|
||||
return;
|
||||
|
||||
typedef String<16> Change;
|
||||
using Change = String<16>;
|
||||
Change const change = event.attribute_value("change", Change());
|
||||
|
||||
if (change == "on") _state = true;
|
||||
@ -103,7 +103,7 @@ struct Global_keys_handler::Main
|
||||
{
|
||||
Deallocator &_alloc;
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
Name const _name;
|
||||
|
||||
Registry<Report>::Element _element;
|
||||
@ -139,7 +139,7 @@ struct Global_keys_handler::Main
|
||||
{
|
||||
Registry<Hover_condition>::Element _element;
|
||||
|
||||
typedef String<160> Domain;
|
||||
using Domain = String<160>;
|
||||
|
||||
Domain const _domain;
|
||||
|
||||
@ -301,7 +301,7 @@ void Global_keys_handler::Main::_apply_input_events(unsigned num_ev,
|
||||
/* ignore key combinations */
|
||||
if (_key_cnt > 1) continue;
|
||||
|
||||
typedef Xml_node Xml_node;
|
||||
using Xml_node = Xml_node;
|
||||
|
||||
auto lambda = [&] (Xml_node node) {
|
||||
|
||||
@ -312,7 +312,7 @@ void Global_keys_handler::Main::_apply_input_events(unsigned num_ev,
|
||||
* XML node applies for current event type, check if the key
|
||||
* matches.
|
||||
*/
|
||||
typedef String<32> Key_name;
|
||||
using Key_name = String<32>;
|
||||
Key_name const expected = node.attribute_value("name", Key_name());
|
||||
|
||||
bool key_matches = false;
|
||||
@ -402,7 +402,7 @@ void Global_keys_handler::Main::_handle_input()
|
||||
_apply_input_events(num_ev, _ev_ds.local_addr<Input::Event const>());
|
||||
|
||||
/* determine currently hovered domain */
|
||||
typedef Report::Hover_condition::Domain Domain;
|
||||
using Domain = Report::Hover_condition::Domain;
|
||||
Domain hovered_domain;
|
||||
if (_hover_ds.constructed()) {
|
||||
_hover_ds->update();
|
||||
|
@ -37,7 +37,7 @@ struct Nit_focus::Main
|
||||
_clicked_rom.update();
|
||||
_config_rom.update();
|
||||
|
||||
typedef String<160> Label;
|
||||
using Label = String<160>;
|
||||
Label const label = _clicked_rom.xml().attribute_value("label", Label());
|
||||
|
||||
try {
|
||||
|
@ -58,7 +58,7 @@ class Pointer::Main : public Rom::Reader
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Genode::String<128> String;
|
||||
using String = Genode::String<128>;
|
||||
|
||||
Genode::Env &_env;
|
||||
|
||||
@ -357,7 +357,7 @@ Pointer::Main::Main(Genode::Env &env) : _env(env)
|
||||
}
|
||||
}
|
||||
|
||||
typedef Gui::Session::View_handle View_handle;
|
||||
using View_handle = Gui::Session::View_handle;
|
||||
_gui.enqueue<Gui::Session::Command::To_front>(_view, View_handle());
|
||||
_gui.execute();
|
||||
|
||||
|
@ -29,7 +29,7 @@ struct Rom_logger::Main
|
||||
|
||||
Genode::Constructible<Genode::Attached_rom_dataspace> _rom_ds { };
|
||||
|
||||
typedef Genode::String<100> Rom_name;
|
||||
using Rom_name = Genode::String<100>;
|
||||
|
||||
/**
|
||||
* Name of currently requested ROM module
|
||||
@ -76,7 +76,7 @@ void Rom_logger::Main::_handle_update()
|
||||
|
||||
Rom_name const rom_name = config.attribute_value("rom", Rom_name());
|
||||
|
||||
typedef Genode::String<8> Format_string;
|
||||
using Format_string = Genode::String<8>;
|
||||
Format_string const format = config.attribute_value("format", Format_string("text"));
|
||||
|
||||
/*
|
||||
|
@ -28,7 +28,7 @@ struct Rom_reporter::Rom_module
|
||||
{
|
||||
Env &_env;
|
||||
|
||||
typedef String<160> Label;
|
||||
using Label = String<160>;
|
||||
Label const _label;
|
||||
|
||||
Attached_rom_dataspace _rom_ds { _env, _label.string() };
|
||||
|
@ -38,7 +38,7 @@ struct Rom_to_file::Main
|
||||
|
||||
Constructible<Attached_rom_dataspace> _rom_ds { };
|
||||
|
||||
typedef String<100> Rom_name;
|
||||
using Rom_name = String<100>;
|
||||
|
||||
/**
|
||||
* Name of currently requested ROM module
|
||||
|
@ -25,11 +25,11 @@ namespace Status_bar {
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
typedef String<128> Domain_name;
|
||||
typedef String<128> Label;
|
||||
typedef Surface_base::Area Area;
|
||||
typedef Surface_base::Point Point;
|
||||
typedef Surface_base::Rect Rect;
|
||||
using Domain_name = String<128>;
|
||||
using Label = String<128>;
|
||||
using Area = Surface_base::Area;
|
||||
using Point = Surface_base::Point;
|
||||
using Rect = Surface_base::Rect;
|
||||
|
||||
struct Buffer;
|
||||
struct Main;
|
||||
@ -120,7 +120,7 @@ void Status_bar::Buffer::draw(Domain_name const &domain_name,
|
||||
Label const &label,
|
||||
Color color)
|
||||
{
|
||||
typedef Pixel_rgb888 PT;
|
||||
using PT = Pixel_rgb888;
|
||||
|
||||
Area const area = _mode.area;
|
||||
|
||||
@ -200,7 +200,7 @@ struct Status_bar::Main
|
||||
_gui.mode_sigh(_mode_handler);
|
||||
|
||||
/* schedule initial view-stacking command, needed only once */
|
||||
typedef Gui::Session::View_handle View_handle;
|
||||
using View_handle = Gui::Session::View_handle;
|
||||
_gui.enqueue<Gui::Session::Command::To_front>(_view, View_handle());
|
||||
|
||||
/* import initial state */
|
||||
|
@ -125,7 +125,7 @@ void Monitor::apply_formatting(Formatting &formatting) const
|
||||
n = max(n, printed_length(arg));
|
||||
};
|
||||
|
||||
typedef Trace::Subject_info Subject_info;
|
||||
using Subject_info = Trace::Subject_info;
|
||||
|
||||
expand(formatting.thread_name, Formatted("Thread ", Quoted_name{_info.thread_name()}));
|
||||
expand(formatting.affinity, Formatted_affinity{_info.affinity()});
|
||||
@ -145,7 +145,7 @@ void Monitor::print(Formatting fmt, Level_of_detail detail)
|
||||
return;
|
||||
|
||||
/* print general subject information */
|
||||
typedef Trace::Subject_info Subject_info;
|
||||
using Subject_info = Trace::Subject_info;
|
||||
Subject_info::State const state = _info.state();
|
||||
|
||||
log(Left_aligned(fmt.thread_name, Formatted("Thread ", Quoted_name{_info.thread_name()})),
|
||||
|
@ -117,7 +117,7 @@ struct Trace_subject_registry
|
||||
xml.attribute("thread", e->info.thread_name().string());
|
||||
xml.attribute("id", e->id.id);
|
||||
|
||||
typedef Genode::Trace::Subject_info Subject_info;
|
||||
using Subject_info = Genode::Trace::Subject_info;
|
||||
Subject_info::State const state = e->info.state();
|
||||
xml.attribute("state", Subject_info::state_name(state));
|
||||
|
||||
|
@ -943,20 +943,19 @@ struct Ahci::Port : private Port_base
|
||||
mmio.write<Port_mmio::Fbu>((uint32_t)(phys >> 32));
|
||||
}
|
||||
|
||||
typedef Port_mmio::Is Is;
|
||||
typedef Port_mmio::Ie Ie;
|
||||
typedef Port_mmio::Cmd Cmd;
|
||||
typedef Port_mmio::Tfd Tfd;
|
||||
typedef Port_mmio::Ssts Ssts;
|
||||
typedef Port_mmio::Serr Serr;
|
||||
typedef Port_mmio::Sctl Sctl;
|
||||
typedef Port_mmio::Sact Sact;
|
||||
typedef Port_mmio::Ci Ci;
|
||||
|
||||
typedef Port_mmio::Register_set::Polling_timeout Polling_timeout;
|
||||
typedef Port_mmio::Register_set::Attempts Attempts;
|
||||
typedef Port_mmio::Register_set::Microseconds Microseconds;
|
||||
using Is = Port_mmio::Is;
|
||||
using Ie = Port_mmio::Ie;
|
||||
using Cmd = Port_mmio::Cmd;
|
||||
using Tfd = Port_mmio::Tfd;
|
||||
using Ssts = Port_mmio::Ssts;
|
||||
using Serr = Port_mmio::Serr;
|
||||
using Sctl = Port_mmio::Sctl;
|
||||
using Sact = Port_mmio::Sact;
|
||||
using Ci = Port_mmio::Ci;
|
||||
|
||||
using Polling_timeout = Port_mmio::Register_set::Polling_timeout;
|
||||
using Attempts = Port_mmio::Register_set::Attempts;
|
||||
using Microseconds = Port_mmio::Register_set::Microseconds;
|
||||
|
||||
void ack_irq(Port_mmio &mmio)
|
||||
{
|
||||
|
@ -145,8 +145,8 @@ class Ata::Protocol : public Ahci::Protocol, Noncopyable
|
||||
Util::Slots<Request, 32> _slots { };
|
||||
unsigned _slot_states = 0;
|
||||
|
||||
typedef String<Identity::Serial_number> Serial_string;
|
||||
typedef String<Identity::Model_number> Model_string;
|
||||
using Serial_string = String<Identity::Serial_number>;
|
||||
using Model_string = String<Identity::Model_number>;
|
||||
|
||||
Constructible<Identity> _identity { };
|
||||
bool _writeable { false };
|
||||
|
@ -228,7 +228,7 @@ struct Audio_out::Root_policy
|
||||
|
||||
|
||||
namespace Audio_out {
|
||||
typedef Root_component<Session_component, Root_policy> Root_component;
|
||||
using Root_component = Root_component<Session_component, Root_policy>;
|
||||
}
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ struct Audio_out::Main
|
||||
|
||||
Main(Genode::Env &env) : env(env)
|
||||
{
|
||||
typedef Genode::String<32> Dev;
|
||||
using Dev = Genode::String<32>;
|
||||
Dev const dev = config.xml().attribute_value("alsa_device", Dev("hw"));
|
||||
|
||||
/* init ALSA */
|
||||
|
@ -178,7 +178,7 @@ class Virtio_fb::Driver
|
||||
static const bool has_data_payload = true;
|
||||
};
|
||||
|
||||
typedef Virtio::Queue<Control_header, Control_queue_traits> Control_queue;
|
||||
using Control_queue = Virtio::Queue<Control_header, Control_queue_traits>;
|
||||
|
||||
class Fb_memory_resource : public Platform::Dma_buffer
|
||||
{
|
||||
|
@ -122,8 +122,8 @@ class Virtio_input::Driver
|
||||
|
||||
enum { QUEUE_SIZE = 64, QUEUE_ELM_SIZE = sizeof(Event) };
|
||||
|
||||
typedef Virtio::Queue<Event, Events_queue_traits> Events_virtqueue;
|
||||
typedef Virtio::Queue<Event, Status_queue_traits> Status_virtqueue;
|
||||
using Events_virtqueue = Virtio::Queue<Event, Events_queue_traits>;
|
||||
using Status_virtqueue = Virtio::Queue<Event, Status_queue_traits>;
|
||||
|
||||
Driver(Driver const &);
|
||||
Driver &operator = (Driver const &);
|
||||
|
@ -143,8 +143,8 @@ class Virtio_nic::Device : Noncopyable
|
||||
static const bool has_data_payload = true;
|
||||
};
|
||||
|
||||
typedef Virtio::Queue<Virtio_net_header, Rx_queue_traits> Rx_queue_type;
|
||||
typedef Virtio::Queue<Virtio_net_header, Tx_queue_traits> Tx_queue_type;
|
||||
using Rx_queue_type = Virtio::Queue<Virtio_net_header, Rx_queue_traits>;
|
||||
using Tx_queue_type = Virtio::Queue<Virtio_net_header, Tx_queue_traits>;
|
||||
|
||||
bool const _verbose;
|
||||
Virtio::Device &_device;
|
||||
|
@ -25,7 +25,7 @@ struct Ps2::Led_state
|
||||
{
|
||||
Genode::Env &_env;
|
||||
|
||||
typedef Genode::String<32> Name;
|
||||
using Name = Genode::String<32>;
|
||||
|
||||
Name const _name;
|
||||
|
||||
@ -37,8 +37,8 @@ struct Ps2::Led_state
|
||||
|
||||
void update(Genode::Xml_node config, Genode::Signal_context_capability sigh)
|
||||
{
|
||||
typedef Genode::String<32> Attr;
|
||||
typedef Genode::String<16> Value;
|
||||
using Attr = Genode::String<32>;
|
||||
using Value = Genode::String<16>;
|
||||
|
||||
Attr const attr(_name, "_led");
|
||||
Value const value = config.attribute_value(attr.string(), Value());
|
||||
|
@ -35,7 +35,7 @@ namespace Uart {
|
||||
class Session_component;
|
||||
class Root;
|
||||
|
||||
typedef Root_component<Session_component, Multiple_clients> Root_component;
|
||||
using Root_component = Root_component<Session_component, Multiple_clients>;
|
||||
};
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
typedef String<32> Mac_name;
|
||||
using Mac_name = String<32>;
|
||||
|
||||
struct Mac_address : Registry<Mac_address>::Element
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ struct genode_uplink : private Noncopyable, private Interface
|
||||
if (!tx_source.ready_to_submit(1))
|
||||
return progress;
|
||||
|
||||
typedef Uplink::Packet_descriptor Packet_descriptor;
|
||||
using Packet_descriptor = Uplink::Packet_descriptor;
|
||||
|
||||
Packet_descriptor packet { };
|
||||
size_t const max_bytes = Nic::Packet_allocator::OFFSET_PACKET_SIZE;
|
||||
@ -143,7 +143,7 @@ struct genode_uplink : private Noncopyable, private Interface
|
||||
if (!rx_sink.packet_avail() || !rx_sink.ack_slots_free())
|
||||
break;
|
||||
|
||||
typedef Uplink::Packet_descriptor Packet_descriptor;
|
||||
using Packet_descriptor = Uplink::Packet_descriptor;
|
||||
|
||||
Packet_descriptor const packet = rx_sink.peek_packet();
|
||||
|
||||
|
@ -21,8 +21,8 @@ namespace Sandbox { struct Alias; }
|
||||
|
||||
struct Sandbox::Alias : List<Alias>::Element, Noncopyable
|
||||
{
|
||||
typedef Child_policy::Name Name;
|
||||
typedef Child_policy::Name Child;
|
||||
using Name = Child_policy::Name;
|
||||
using Child = Child_policy::Name;
|
||||
|
||||
Name const name;
|
||||
|
||||
|
@ -108,7 +108,7 @@ Sandbox::Child::apply_config(Xml_node start_node)
|
||||
if (!_provided_by_this(service))
|
||||
return;
|
||||
|
||||
typedef Service::Name Name;
|
||||
using Name = Service::Name;
|
||||
Name const name = service.name();
|
||||
|
||||
bool still_provided = false;
|
||||
@ -556,7 +556,7 @@ Sandbox::Child::resolve_session_request(Service::Name const &service_name,
|
||||
* client's identity by a custom label via the 'label'
|
||||
* attribute.
|
||||
*/
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
Label const target_label =
|
||||
target.attribute_value("label", Label(label.string()));
|
||||
|
||||
@ -583,7 +583,7 @@ Sandbox::Child::resolve_session_request(Service::Name const &service_name,
|
||||
|
||||
if (target.has_type("child")) {
|
||||
|
||||
typedef Name_registry::Name Name;
|
||||
using Name = Name_registry::Name;
|
||||
Name server_name = target.attribute_value("name", Name());
|
||||
server_name = _name_registry.deref_alias(server_name);
|
||||
|
||||
|
@ -37,7 +37,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
|
||||
{
|
||||
public:
|
||||
|
||||
typedef String<80> Version;
|
||||
using Version = String<80>;
|
||||
|
||||
/**
|
||||
* Exception types
|
||||
@ -62,9 +62,9 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
|
||||
virtual QUOTA resource_limit(QUOTA const &) const = 0;
|
||||
};
|
||||
|
||||
typedef Resource_limit_accessor<Ram_quota> Ram_limit_accessor;
|
||||
typedef Resource_limit_accessor<Cap_quota> Cap_limit_accessor;
|
||||
typedef Resource_limit_accessor<Cpu_quota> Cpu_limit_accessor;
|
||||
using Ram_limit_accessor = Resource_limit_accessor<Ram_quota>;
|
||||
using Cap_limit_accessor = Resource_limit_accessor<Cap_quota>;
|
||||
using Cpu_limit_accessor = Resource_limit_accessor<Cpu_quota>;
|
||||
|
||||
struct Cpu_quota_transfer : Interface
|
||||
{
|
||||
@ -193,7 +193,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
|
||||
throw Missing_name_attribute();
|
||||
}
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
Name const _unique_name { _name_from_xml(_start_node->xml()) };
|
||||
|
||||
static Binary_name _binary_from_xml(Xml_node start_node,
|
||||
@ -277,7 +277,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
|
||||
|
||||
start_node.for_each_sub_node("resource", [&] (Xml_node rsc) {
|
||||
|
||||
typedef String<8> Name;
|
||||
using Name = String<8>;
|
||||
Name const name = rsc.attribute_value("name", Name());
|
||||
|
||||
if (name == "RAM")
|
||||
@ -322,7 +322,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
|
||||
|
||||
struct Inline_config_rom_service : Abandonable, Dynamic_rom_session::Content_producer
|
||||
{
|
||||
typedef Genode::Local_service<Dynamic_rom_session> Service;
|
||||
using Service = Genode::Local_service<Dynamic_rom_session>;
|
||||
|
||||
Child &_child;
|
||||
|
||||
|
@ -200,7 +200,7 @@ struct Config_model::Resource_node : Node
|
||||
|
||||
static Category _category_from_xml(Xml_node const &xml)
|
||||
{
|
||||
typedef String<16> Name;
|
||||
using Name = String<16>;
|
||||
Name const name = xml.attribute_value("name", Name());
|
||||
|
||||
if (name == "RAM") return Category::RAM;
|
||||
|
@ -117,8 +117,8 @@ struct Sandbox::Start_model : Noncopyable
|
||||
* because both node types share the same name space.
|
||||
*/
|
||||
|
||||
typedef Child_policy::Name Name;
|
||||
typedef Child::Version Version;
|
||||
using Name = Child_policy::Name;
|
||||
using Version = Child::Version;
|
||||
|
||||
static char const *start_type() { return "start"; }
|
||||
static char const *alias_type() { return "alias"; }
|
||||
@ -264,7 +264,7 @@ class Sandbox::Config_model : Noncopyable
|
||||
|
||||
public:
|
||||
|
||||
typedef State_reporter::Version Version;
|
||||
using Version = State_reporter::Version;
|
||||
|
||||
void update_from_xml(Xml_node const &,
|
||||
Allocator &,
|
||||
|
@ -26,7 +26,7 @@ struct Sandbox::Name_registry
|
||||
{
|
||||
virtual ~Name_registry() { }
|
||||
|
||||
typedef Child_policy::Name Name;
|
||||
using Name = Child_policy::Name;
|
||||
|
||||
/**
|
||||
* Return child name for a given alias name
|
||||
|
@ -95,7 +95,7 @@ class Sandbox::Route_model : Noncopyable
|
||||
|
||||
struct Selector
|
||||
{
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
|
||||
enum class Type
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
struct Sandbox::Server::Service : Service_model
|
||||
{
|
||||
typedef Genode::Service::Name Name;
|
||||
using Name = Genode::Service::Name;
|
||||
|
||||
Name const _name;
|
||||
|
||||
@ -98,7 +98,7 @@ Sandbox::Server::Service::resolve_session_request(Session_label const &label)
|
||||
Child_policy::Name const child_name =
|
||||
target_node.attribute_value("name", Child_policy::Name());
|
||||
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
Label const target_label =
|
||||
target_node.attribute_value("label", Label(label.string()));
|
||||
|
||||
@ -220,7 +220,7 @@ void Sandbox::Server::_handle_create_session_request(Xml_node request,
|
||||
if (!request.has_sub_node("args"))
|
||||
return;
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
Args const args = request.sub_node("args").decoded_content<Args>();
|
||||
|
||||
Service::Name const name = request.attribute_value("service", Service::Name());
|
||||
|
@ -63,7 +63,7 @@ class Sandbox::Routed_service : public Async_service, public Abandonable
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Child_policy::Name Child_name;
|
||||
using Child_name = Child_policy::Name;
|
||||
|
||||
struct Pd_accessor : Interface
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ class Sandbox::State_reporter : public Report_update_trigger
|
||||
{
|
||||
public:
|
||||
|
||||
typedef String<64> Version;
|
||||
using Version = String<64>;
|
||||
|
||||
struct Producer : Interface
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ namespace Sandbox {
|
||||
void print(Output &out) const { Genode::print(out, percent, "%"); }
|
||||
};
|
||||
|
||||
typedef List<List_element<Child> > Child_list;
|
||||
using Child_list = List<List_element<Child> >;
|
||||
|
||||
template <typename T>
|
||||
struct Resource_info
|
||||
@ -46,7 +46,7 @@ namespace Sandbox {
|
||||
|
||||
void generate(Xml_generator &xml) const
|
||||
{
|
||||
typedef String<32> Value;
|
||||
using Value = String<32>;
|
||||
xml.attribute("quota", Value(quota));
|
||||
xml.attribute("used", Value(used));
|
||||
xml.attribute("avail", Value(avail));
|
||||
@ -60,8 +60,8 @@ namespace Sandbox {
|
||||
}
|
||||
};
|
||||
|
||||
typedef Resource_info<Ram_quota> Ram_info;
|
||||
typedef Resource_info<Cap_quota> Cap_info;
|
||||
using Ram_info = Resource_info<Ram_quota>;
|
||||
using Cap_info = Resource_info<Cap_quota>;
|
||||
|
||||
template <>
|
||||
inline Ram_info Ram_info::from_pd(Pd_session const &pd)
|
||||
|
@ -69,7 +69,7 @@ namespace Sandbox {
|
||||
if (!service_matches)
|
||||
return false;
|
||||
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
|
||||
char const *unscoped_attr = "unscoped_label";
|
||||
char const *label_last_attr = "label_last";
|
||||
@ -209,7 +209,7 @@ namespace Sandbox {
|
||||
inline Affinity::Location
|
||||
affinity_location_from_xml(Affinity::Space const &space, Xml_node start_node)
|
||||
{
|
||||
typedef Affinity::Location Location;
|
||||
using Location = Affinity::Location;
|
||||
|
||||
Location result = Location(0, 0, space.width(), space.height());
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Vfs { class Block_file_system; }
|
||||
|
||||
struct Vfs::Block_file_system
|
||||
{
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
struct Local_factory;
|
||||
struct Data_file_system;
|
||||
@ -428,7 +428,7 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system
|
||||
|
||||
struct Vfs::Block_file_system::Local_factory : File_system_factory
|
||||
{
|
||||
typedef Genode::String<64> Label;
|
||||
using Label = Genode::String<64>;
|
||||
Label const _label;
|
||||
|
||||
Name const _name;
|
||||
|
@ -23,7 +23,7 @@ namespace Vfs_capture
|
||||
using namespace Genode;
|
||||
using namespace Vfs;
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
struct Data_file_system;
|
||||
struct Local_factory;
|
||||
@ -37,7 +37,7 @@ class Vfs_capture::Data_file_system : public Single_file_system
|
||||
|
||||
Name const &_name;
|
||||
|
||||
typedef Genode::String<64> Label;
|
||||
using Label = Genode::String<64>;
|
||||
Label const &_label;
|
||||
|
||||
Genode::Env &_env;
|
||||
@ -89,8 +89,8 @@ class Vfs_capture::Data_file_system : public Single_file_system
|
||||
}
|
||||
};
|
||||
|
||||
typedef Genode::Registered<Capture_vfs_handle> Registered_handle;
|
||||
typedef Genode::Registry<Registered_handle> Handle_registry;
|
||||
using Registered_handle = Genode::Registered<Capture_vfs_handle>;
|
||||
using Handle_registry = Genode::Registry<Registered_handle>;
|
||||
|
||||
Handle_registry _handle_registry { };
|
||||
|
||||
@ -174,7 +174,7 @@ class Vfs_capture::Data_file_system : public Single_file_system
|
||||
|
||||
struct Vfs_capture::Local_factory : File_system_factory
|
||||
{
|
||||
typedef Genode::String<64> Label;
|
||||
using Label = Genode::String<64>;
|
||||
Label const _label;
|
||||
|
||||
Name const _name;
|
||||
@ -209,9 +209,9 @@ class Vfs_capture::File_system : private Local_factory,
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Vfs_capture::Name Name;
|
||||
using Name = Vfs_capture::Name;
|
||||
|
||||
typedef String<200> Config;
|
||||
using Config = String<200>;
|
||||
static Config _config(Name const &name)
|
||||
{
|
||||
char buf[Config::capacity()] { };
|
||||
|
@ -31,17 +31,17 @@ class Vfs::Fs_file_system : public File_system, private Remote_io
|
||||
Vfs::Env &_env;
|
||||
Genode::Allocator_avl _fs_packet_alloc { &_env.alloc() };
|
||||
|
||||
typedef Genode::String<64> Label_string;
|
||||
using Label_string = Genode::String<64>;
|
||||
Label_string _label;
|
||||
|
||||
typedef Genode::String<::File_system::MAX_NAME_LEN> Root_string;
|
||||
using Root_string = Genode::String<::File_system::MAX_NAME_LEN>;
|
||||
Root_string _root;
|
||||
|
||||
::File_system::Connection _fs;
|
||||
|
||||
bool _write_would_block = false;
|
||||
|
||||
typedef Genode::Id_space<::File_system::Node> Handle_space;
|
||||
using Handle_space = Genode::Id_space<::File_system::Node>;
|
||||
|
||||
Handle_space _handle_space { };
|
||||
Handle_space _watch_handle_space { };
|
||||
@ -60,7 +60,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io
|
||||
};
|
||||
|
||||
struct Fs_vfs_handle;
|
||||
typedef Genode::Fifo<Fs_vfs_handle> Fs_vfs_handle_queue;
|
||||
using Fs_vfs_handle_queue = Genode::Fifo<Fs_vfs_handle>;
|
||||
|
||||
Remote_io::Peer _peer { _env.deferred_wakeups(), *this };
|
||||
|
||||
|
@ -25,7 +25,7 @@ class Vfs::Log_file_system : public Single_file_system
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Genode::String<64> Label;
|
||||
using Label = Genode::String<64>;
|
||||
Label _label;
|
||||
|
||||
Genode::Constructible<Genode::Log_connection> _log_connection { };
|
||||
|
@ -40,7 +40,7 @@ namespace Vfs_ram {
|
||||
|
||||
enum { MAX_NAME_LEN = 128 };
|
||||
|
||||
typedef Genode::Allocator::Out_of_memory Out_of_memory;
|
||||
using Out_of_memory = Genode::Allocator::Out_of_memory;
|
||||
|
||||
/**
|
||||
* Return base-name portion of null-terminated path string
|
||||
@ -255,10 +255,10 @@ class Vfs_ram::File : public Vfs_ram::Node
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Chunk <num_level_3_entries()> Chunk_level_3;
|
||||
typedef Chunk_index<num_level_2_entries(), Chunk_level_3> Chunk_level_2;
|
||||
typedef Chunk_index<num_level_1_entries(), Chunk_level_2> Chunk_level_1;
|
||||
typedef Chunk_index<num_level_0_entries(), Chunk_level_1> Chunk_level_0;
|
||||
using Chunk_level_3 = Chunk <num_level_3_entries()>;
|
||||
using Chunk_level_2 = Chunk_index<num_level_2_entries(), Chunk_level_3>;
|
||||
using Chunk_level_1 = Chunk_index<num_level_1_entries(), Chunk_level_2>;
|
||||
using Chunk_level_0 = Chunk_index<num_level_0_entries(), Chunk_level_1>;
|
||||
|
||||
Chunk_level_0 _chunk;
|
||||
|
||||
@ -441,7 +441,7 @@ class Vfs_ram::Directory : public Vfs_ram::Node
|
||||
Seek const seek,
|
||||
size_t &out_count) override
|
||||
{
|
||||
typedef Vfs::Directory_service::Dirent Dirent;
|
||||
using Dirent = Vfs::Directory_service::Dirent;
|
||||
|
||||
if (dst.num_bytes < sizeof(Dirent))
|
||||
return Vfs::File_io_service::READ_ERR_INVALID;
|
||||
|
@ -31,7 +31,7 @@ class Vfs::Rom_file_system : public Single_file_system
|
||||
|
||||
Vfs::Env::User &_vfs_user;
|
||||
|
||||
typedef String<64> Label;
|
||||
using Label = String<64>;
|
||||
|
||||
Label const _label;
|
||||
|
||||
@ -116,8 +116,8 @@ class Vfs::Rom_file_system : public Single_file_system
|
||||
bool write_ready() const override { return false; }
|
||||
};
|
||||
|
||||
typedef Genode::Registered<Vfs_watch_handle> Registered_watch_handle;
|
||||
typedef Genode::Registry<Registered_watch_handle> Watch_handle_registry;
|
||||
using Registered_watch_handle = Genode::Registered<Vfs_watch_handle>;
|
||||
using Watch_handle_registry = Genode::Registry<Registered_watch_handle>;
|
||||
|
||||
Watch_handle_registry _handle_registry { };
|
||||
|
||||
|
@ -106,8 +106,8 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
bool write_ready() const override { return false; }
|
||||
};
|
||||
|
||||
typedef Genode::Registered<Vfs_watch_handle> Registered_watch_handle;
|
||||
typedef Genode::Registry<Registered_watch_handle> Watch_handle_registry;
|
||||
using Registered_watch_handle = Genode::Registered<Vfs_watch_handle>;
|
||||
using Watch_handle_registry = Genode::Registry<Registered_watch_handle>;
|
||||
|
||||
Rtc::Connection _rtc;
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Vfs::Symlink_file_system : public Single_file_system
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Genode::String<MAX_PATH_LEN> Target;
|
||||
using Target = Genode::String<MAX_PATH_LEN>;
|
||||
|
||||
Target const _target;
|
||||
|
||||
|
@ -318,9 +318,9 @@ class Vfs::Tap_file_system::Compound_file_system : private Local_factory<FS>,
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Tap_file_system::Name Name;
|
||||
using Name = Tap_file_system::Name;
|
||||
|
||||
typedef String<200> Config;
|
||||
using Config = String<200>;
|
||||
static Config _config(Name const &name)
|
||||
{
|
||||
char buf[Config::capacity()] { };
|
||||
|
@ -27,7 +27,7 @@ class Vfs::Tar_file_system : public File_system
|
||||
Genode::Env &_env;
|
||||
Genode::Allocator &_alloc;
|
||||
|
||||
typedef Genode::String<64> Rom_name;
|
||||
using Rom_name = Genode::String<64>;
|
||||
Rom_name _rom_name;
|
||||
|
||||
Genode::Attached_rom_dataspace _tar_ds { _env, _rom_name.string() };
|
||||
@ -284,7 +284,7 @@ class Vfs::Tar_file_system : public File_system
|
||||
};
|
||||
|
||||
|
||||
typedef Genode::Token<Scanner_policy_path_element> Path_element_token;
|
||||
using Path_element_token = Genode::Token<Scanner_policy_path_element>;
|
||||
|
||||
|
||||
struct Node : List<Node>, List<Node>::Element
|
||||
|
@ -29,7 +29,7 @@ namespace Vfs { class Terminal_file_system; }
|
||||
|
||||
struct Vfs::Terminal_file_system
|
||||
{
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
struct Local_factory;
|
||||
struct Data_file_system;
|
||||
@ -68,8 +68,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system
|
||||
|
||||
enum { READ_BUFFER_SIZE = 4000 };
|
||||
|
||||
typedef Genode::Ring_buffer<char, READ_BUFFER_SIZE + 1,
|
||||
Genode::Ring_buffer_unsynchronized> Read_buffer;
|
||||
using Read_buffer = Genode::Ring_buffer<char, READ_BUFFER_SIZE + 1,
|
||||
Genode::Ring_buffer_unsynchronized>;
|
||||
|
||||
Read_buffer _read_buffer { };
|
||||
|
||||
@ -174,8 +174,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system
|
||||
}
|
||||
};
|
||||
|
||||
typedef Genode::Registered<Terminal_vfs_handle> Registered_handle;
|
||||
typedef Genode::Registry<Registered_handle> Handle_registry;
|
||||
using Registered_handle = Genode::Registered<Terminal_vfs_handle>;
|
||||
using Handle_registry = Genode::Registry<Registered_handle>;
|
||||
|
||||
Handle_registry _handle_registry { };
|
||||
|
||||
@ -265,7 +265,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system
|
||||
struct Vfs::Terminal_file_system::Local_factory : File_system_factory,
|
||||
Data_file_system::Interrupt_handler
|
||||
{
|
||||
typedef Genode::String<64> Label;
|
||||
using Label = Genode::String<64>;
|
||||
Label const _label;
|
||||
|
||||
Name const _name;
|
||||
@ -361,9 +361,9 @@ class Vfs::Terminal_file_system::Compound_file_system : private Local_factory,
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Terminal_file_system::Name Name;
|
||||
using Name = Terminal_file_system::Name;
|
||||
|
||||
typedef String<200> Config;
|
||||
using Config = String<200>;
|
||||
static Config _config(Name const &name)
|
||||
{
|
||||
char buf[Config::capacity()] { };
|
||||
|
@ -60,7 +60,7 @@ struct Monitor::Gdb::State : Noncopyable
|
||||
|
||||
Memory_map(Inferior_pd &inferior)
|
||||
{
|
||||
typedef String<16> Value;
|
||||
using Value = String<16>;
|
||||
|
||||
Xml_generator xml(_buf, sizeof(_buf), "memory-map", [&] {
|
||||
|
||||
|
@ -109,7 +109,7 @@ class Audio_in::Session_component : Audio_in::Session_component_base,
|
||||
|
||||
|
||||
namespace Audio_in {
|
||||
typedef Genode::Root_component<Session_component, Genode::Multiple_clients> Root_component;
|
||||
using Root_component = Genode::Root_component<Session_component, Genode::Multiple_clients>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ class Audio_out::Session_component : Audio_out::Session_component_base,
|
||||
|
||||
|
||||
namespace Audio_out {
|
||||
typedef Genode::Root_component<Session_component, Genode::Multiple_clients> Root_component;
|
||||
using Root_component = Genode::Root_component<Session_component, Genode::Multiple_clients>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,7 +93,7 @@ class Capture::Session_component : public Session_object<Capture::Session>
|
||||
|
||||
|
||||
namespace Capture {
|
||||
typedef Genode::Root_component<Session_component, Genode::Multiple_clients> Root_component;
|
||||
using Root_component = Genode::Root_component<Session_component, Genode::Multiple_clients>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,22 +33,22 @@
|
||||
namespace Cached_fs_rom {
|
||||
|
||||
using namespace Genode;
|
||||
typedef Genode::Path<File_system::MAX_PATH_LEN> Path;
|
||||
typedef File_system::Session_client::Tx::Source Tx_source;
|
||||
using Path = Genode::Path<File_system::MAX_PATH_LEN>;
|
||||
using Tx_source = File_system::Session_client::Tx::Source;
|
||||
|
||||
struct Cached_rom;
|
||||
typedef Genode::Id_space<Cached_rom> Cache_space;
|
||||
using Cache_space = Genode::Id_space<Cached_rom>;
|
||||
|
||||
struct Transfer;
|
||||
typedef Genode::Id_space<Transfer> Transfer_space;
|
||||
using Transfer_space = Genode::Id_space<Transfer>;
|
||||
|
||||
class Session_component;
|
||||
typedef Genode::Id_space<Session_component> Session_space;
|
||||
using Session_space = Genode::Id_space<Session_component>;
|
||||
|
||||
struct Main;
|
||||
|
||||
typedef File_system::Session::Tx::Source::Packet_alloc_failed Packet_alloc_failed;
|
||||
typedef File_system::File_handle File_handle;
|
||||
using Packet_alloc_failed = File_system::Session::Tx::Source::Packet_alloc_failed;
|
||||
using File_handle = File_system::File_handle;
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,8 +54,8 @@ class Genode::Session_requests_rom : public Signal_handler<Session_requests_rom>
|
||||
Parent::Server::Id const id {
|
||||
request.attribute_value("id", ~0UL) };
|
||||
|
||||
typedef Session_state::Name Name;
|
||||
typedef Session_state::Args Args;
|
||||
using Name = Session_state::Name;
|
||||
using Args = Session_state::Args;
|
||||
|
||||
Name name { };
|
||||
Args args { };
|
||||
@ -87,7 +87,7 @@ class Genode::Session_requests_rom : public Signal_handler<Session_requests_rom>
|
||||
Parent::Server::Id const id {
|
||||
request.attribute_value("id", ~0UL) };
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
Args args { };
|
||||
try { args = request.sub_node("args").decoded_content<Args>(); }
|
||||
catch (...) {
|
||||
|
@ -32,7 +32,7 @@ namespace Chroot {
|
||||
struct Chroot::Main
|
||||
{
|
||||
enum { PATH_MAX_LEN = 128 };
|
||||
typedef Genode::Path<PATH_MAX_LEN> Path;
|
||||
using Path = Genode::Path<PATH_MAX_LEN>;
|
||||
|
||||
/**
|
||||
* Object to bind ids between parent and client space.
|
||||
@ -107,7 +107,7 @@ struct Chroot::Main
|
||||
Session_state::Args const &args,
|
||||
Affinity const affinity)
|
||||
{
|
||||
typedef String<PATH_MAX_LEN> Prefix;
|
||||
using Prefix = String<PATH_MAX_LEN>;
|
||||
|
||||
Path root_path;
|
||||
|
||||
@ -198,7 +198,7 @@ void Chroot::Main::handle_session_request(Xml_node request)
|
||||
if (!request.has_sub_node("args"))
|
||||
return;
|
||||
|
||||
typedef Session_state::Args Args;
|
||||
using Args = Session_state::Args;
|
||||
Args const args = request.sub_node("args").decoded_content<Args>();
|
||||
|
||||
Session *session = nullptr;
|
||||
|
@ -84,8 +84,8 @@ struct Clipboard::Main : Rom::Module::Read_policy, Rom::Module::Write_policy
|
||||
bool _verbose = false;
|
||||
bool _match_labels = false;
|
||||
|
||||
typedef Genode::String<100> Domain;
|
||||
typedef Genode::String<100> Label;
|
||||
using Domain = Genode::String<100>;
|
||||
using Label = Genode::String<100>;
|
||||
|
||||
Genode::Attached_rom_dataspace _focus_ds { _env, "focus" };
|
||||
|
||||
|
@ -69,8 +69,8 @@ auto retry(T &env, FUNC func, HANDLER handler,
|
||||
return;
|
||||
}
|
||||
|
||||
typedef Genode::Registry<Genode::Registered<Cpu::Sleeper> > Sleeper_list;
|
||||
typedef Genode::Tslab<Genode::Registered<Cpu::Sleeper>, 4096> Tslab_sleeper;
|
||||
using Sleeper_list = Genode::Registry<Genode::Registered<Cpu::Sleeper> >;
|
||||
using Tslab_sleeper = Genode::Tslab<Genode::Registered<Cpu::Sleeper>, 4096>;
|
||||
|
||||
namespace Cpu {
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
void Cpu::Config::apply(Xml_node const &start, Child_list &sessions)
|
||||
{
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
|
||||
start.for_each_sub_node("component", [&](Xml_node const &node) {
|
||||
if (!node.has_attribute("label"))
|
||||
@ -60,7 +60,7 @@ void Cpu::Config::apply(Xml_node const &start, Child_list &sessions)
|
||||
void Cpu::Config::apply_for_thread(Xml_node const &start, Cpu::Session &session,
|
||||
Thread::Name const &target_thread)
|
||||
{
|
||||
typedef String<Session_label::capacity()> Label;
|
||||
using Label = String<Session_label::capacity()>;
|
||||
|
||||
start.for_each_sub_node("component", [&](Xml_node const &node) {
|
||||
if (!node.has_attribute("label"))
|
||||
|
@ -21,9 +21,9 @@
|
||||
|
||||
namespace Cpu
|
||||
{
|
||||
typedef Genode::Affinity::Location Location;
|
||||
typedef Genode::Trace::Execution_time Execution_time;
|
||||
typedef Genode::Cpu_session::Name Name;
|
||||
using Location = Genode::Affinity::Location;
|
||||
using Execution_time = Genode::Trace::Execution_time;
|
||||
using Name = Genode::Cpu_session::Name;
|
||||
|
||||
class Policy;
|
||||
class Policy_none;
|
||||
@ -64,7 +64,7 @@ class Cpu::Policy {
|
||||
|
||||
public:
|
||||
|
||||
typedef Genode::String<16> Name;
|
||||
using Name = Genode::String<16>;
|
||||
|
||||
Location location { };
|
||||
|
||||
|
@ -35,10 +35,10 @@ namespace Cpu {
|
||||
class Trace;
|
||||
class Policy;
|
||||
struct Thread_client;
|
||||
typedef Id_space<Parent::Client>::Element Client_id;
|
||||
typedef Registry<Registered<Session> > Child_list;
|
||||
typedef Registry<Registered<Thread_client> > Thread_list;
|
||||
typedef Constrained_ram_allocator Ram_allocator;
|
||||
using Client_id = Id_space<Parent::Client>::Element;
|
||||
using Child_list = Registry<Registered<Session> >;
|
||||
using Thread_list = Registry<Registered<Thread_client> >;
|
||||
using Ram_allocator = Constrained_ram_allocator;
|
||||
}
|
||||
|
||||
struct Cpu::Thread_client : Interface
|
||||
|
@ -74,7 +74,7 @@ class Dynamic_rom::Session_component : public Rpc_object<Genode::Rom_session>
|
||||
if (!_verbose)
|
||||
return;
|
||||
|
||||
typedef Genode::String<160> Name;
|
||||
using Name = Genode::String<160>;
|
||||
Genode::log(_rom_node.attribute_value("name", Name()), ": ", args...);
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ class Dynamic_rom::Session_component : public Rpc_object<Genode::Rom_session>
|
||||
_notify_client();
|
||||
|
||||
if (curr_step.has_attribute("description")) {
|
||||
typedef Genode::String<200> Desc;
|
||||
using Desc = Genode::String<200>;
|
||||
Desc desc = curr_step.attribute_value("description", Desc());
|
||||
_log("change (", desc.string(), ")");
|
||||
} else {
|
||||
@ -148,7 +148,7 @@ class Dynamic_rom::Session_component : public Rpc_object<Genode::Rom_session>
|
||||
|
||||
Entrypoint &_ep;
|
||||
|
||||
typedef Session_component This;
|
||||
using This = Session_component;
|
||||
Signal_handler<This> _timer_handler = { _ep, *this, &This::_handle_timer };
|
||||
|
||||
public:
|
||||
|
@ -29,7 +29,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Input::Event Event;
|
||||
using Event = Input::Event;
|
||||
|
||||
Allocator &_alloc;
|
||||
Timer_accessor &_timer_accessor;
|
||||
@ -43,7 +43,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
{
|
||||
enum Id { MOD1 = 0, MOD2 = 1, MOD3 = 2, MOD4 = 3, UNDEFINED };
|
||||
|
||||
typedef String<8> Name;
|
||||
using Name = String<8>;
|
||||
|
||||
Registry<Modifier>::Element _element;
|
||||
|
||||
@ -75,7 +75,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
|
||||
struct Modifier_rom
|
||||
{
|
||||
typedef String<32> Name;
|
||||
using Name = String<32>;
|
||||
|
||||
Registry<Modifier_rom>::Element _element;
|
||||
|
||||
@ -255,7 +255,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
|
||||
if (node.has_attribute("char")) {
|
||||
|
||||
typedef String<2> Value;
|
||||
using Value = String<2>;
|
||||
Value value = node.attribute_value("char", Value());
|
||||
|
||||
unsigned char const ascii = value.string()[0];
|
||||
@ -424,7 +424,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
|
||||
struct Rule
|
||||
{
|
||||
typedef Sequence::Match Match;
|
||||
using Match = Sequence::Match;
|
||||
|
||||
Registry<Rule>::Element element;
|
||||
Sequence const sequence;
|
||||
@ -704,7 +704,7 @@ class Event_filter::Chargen_source : public Source, Source::Filter
|
||||
|
||||
node.for_each_sub_node("rom", [&] (Xml_node rom_node) {
|
||||
|
||||
typedef Modifier_rom::Name Rom_name;
|
||||
using Rom_name = Modifier_rom::Name;
|
||||
Rom_name const rom_name = rom_node.attribute_value("name", Rom_name());
|
||||
|
||||
new (_alloc) Modifier_rom(_modifier_roms, id, _include_accessor, rom_name);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace Event_filter {
|
||||
|
||||
typedef String<Session_label::capacity()> Input_name;
|
||||
using Input_name = String<Session_label::capacity()>;
|
||||
|
||||
class Event_session;
|
||||
class Event_root;
|
||||
|
@ -27,8 +27,8 @@ class Event_filter::Include_accessor : Interface
|
||||
{
|
||||
public:
|
||||
|
||||
typedef String<64> Name;
|
||||
typedef String<32> Type;
|
||||
using Name = String<64>;
|
||||
using Type = String<32>;
|
||||
|
||||
struct Include_unavailable : Exception { };
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace Event_filter {
|
||||
|
||||
struct Unknown_key : Genode::Exception { };
|
||||
|
||||
typedef Genode::String<20> Key_name;
|
||||
using Key_name = Genode::String<20>;
|
||||
|
||||
/*
|
||||
* \throw Unknown_key
|
||||
|
@ -29,7 +29,7 @@ class Event_filter::Log_source : public Source, Source::Filter
|
||||
{
|
||||
private:
|
||||
|
||||
typedef String<32> Prefix;
|
||||
using Prefix = String<32>;
|
||||
|
||||
Prefix _prefix = "";
|
||||
|
||||
|
@ -84,7 +84,7 @@ struct Event_filter::Main : Source::Factory, Source::Trigger
|
||||
{
|
||||
struct Rom
|
||||
{
|
||||
typedef Include_accessor::Name Name;
|
||||
using Name = Include_accessor::Name;
|
||||
|
||||
Registry<Rom>::Element _reg_elem;
|
||||
Name const _name;
|
||||
|
@ -32,12 +32,12 @@ namespace Fs_report {
|
||||
class Root;
|
||||
struct Main;
|
||||
|
||||
typedef Genode::Path<Session_label::capacity()> Path;
|
||||
using Path = Genode::Path<Session_label::capacity()>;
|
||||
|
||||
static bool create_parent_dir(Vfs::Directory_service &vfs, Path const &child,
|
||||
Genode::Allocator &alloc)
|
||||
{
|
||||
typedef Vfs::Directory_service::Opendir_result Opendir_result;
|
||||
using Opendir_result = Vfs::Directory_service::Opendir_result;
|
||||
|
||||
Path parent = child;
|
||||
parent.strip_last_element();
|
||||
@ -84,7 +84,7 @@ class Fs_report::Session_component : public Genode::Rpc_object<Report::Session>
|
||||
|
||||
template <typename FN> void _file_op(FN const &fn)
|
||||
{
|
||||
typedef Vfs::Directory_service::Open_result Open_result;
|
||||
using Open_result = Vfs::Directory_service::Open_result;
|
||||
|
||||
Vfs_handle *handle;
|
||||
Open_result res = _vfs.open(_path.base(),
|
||||
@ -146,7 +146,7 @@ class Fs_report::Session_component : public Genode::Rpc_object<Report::Session>
|
||||
{
|
||||
auto fn = [&] (Vfs_handle *handle) {
|
||||
|
||||
typedef Vfs::File_io_service::Write_result Write_result;
|
||||
using Write_result = Vfs::File_io_service::Write_result;
|
||||
|
||||
if (_file_size != length)
|
||||
handle->fs().ftruncate(handle, length);
|
||||
|
@ -35,9 +35,9 @@ namespace Fs_rom {
|
||||
class Rom_session_component;
|
||||
class Rom_root;
|
||||
|
||||
typedef Id_space<Rom_session_component> Sessions;
|
||||
using Sessions = Id_space<Rom_session_component>;
|
||||
|
||||
typedef File_system::Session_client::Tx::Source Tx_source;
|
||||
using Tx_source = File_system::Session_client::Tx::Source;
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class Fs_rom::Rom_session_component : public Rpc_object<Rom_session>
|
||||
Constructible<Sessions::Element> _watch_elem { };
|
||||
|
||||
enum { PATH_MAX_LEN = 512 };
|
||||
typedef Genode::Path<PATH_MAX_LEN> Path;
|
||||
using Path = Genode::Path<PATH_MAX_LEN>;
|
||||
|
||||
/**
|
||||
* Name of requested file, interpreted at path into the file system
|
||||
|
@ -29,9 +29,9 @@ namespace Nit_fb {
|
||||
using Genode::Xml_node;
|
||||
using Genode::size_t;
|
||||
|
||||
typedef Genode::Surface_base::Point Point;
|
||||
typedef Genode::Surface_base::Area Area;
|
||||
typedef Genode::Surface_base::Rect Rect;
|
||||
using Point = Genode::Surface_base::Point;
|
||||
using Area = Genode::Surface_base::Area;
|
||||
using Rect = Genode::Surface_base::Rect;
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ struct Framebuffer::Session_component : Genode::Rpc_object<Framebuffer::Session>
|
||||
*/
|
||||
Framebuffer::Mode _next_mode;
|
||||
|
||||
typedef Genode::size_t size_t;
|
||||
using size_t = Genode::size_t;
|
||||
|
||||
/*
|
||||
* Number of bytes used for backing the current virtual framebuffer at
|
||||
@ -244,7 +244,7 @@ struct Nit_fb::Main : View_updater
|
||||
|
||||
unsigned refresh_rate = 0;
|
||||
|
||||
typedef Gui::Session::View_handle View_handle;
|
||||
using View_handle = Gui::Session::View_handle;
|
||||
|
||||
View_handle view = gui.create_view();
|
||||
|
||||
@ -304,7 +304,7 @@ struct Nit_fb::Main : View_updater
|
||||
*/
|
||||
void update_view() override
|
||||
{
|
||||
typedef Gui::Session::Command Command;
|
||||
using Command = Gui::Session::Command;
|
||||
gui.enqueue<Command::Geometry>(view, Rect(position, fb_session.size()));
|
||||
gui.enqueue<Command::To_front>(view, View_handle());
|
||||
gui.execute();
|
||||
@ -320,7 +320,7 @@ struct Nit_fb::Main : View_updater
|
||||
if (!config.has_attribute(attr))
|
||||
return Point(0, 0);
|
||||
|
||||
typedef Genode::String<32> Value;
|
||||
using Value = Genode::String<32>;
|
||||
Value const value = config.attribute_value(attr, Value());
|
||||
|
||||
if (value == "top_left") return Point(0, 0);
|
||||
|
@ -39,7 +39,7 @@ class Terminal::Buffered_output
|
||||
|
||||
enum { SIZE = Genode::Log_session::String::MAX_SIZE };
|
||||
|
||||
typedef Genode::size_t size_t;
|
||||
using size_t = Genode::size_t;
|
||||
|
||||
char _buf[SIZE + 1 /* room for null-termination */ ];
|
||||
|
||||
|
@ -44,7 +44,7 @@ class Lx_block_driver : public Block::Driver
|
||||
|
||||
Block::Session::Info const _info;
|
||||
|
||||
typedef Genode::String<256> File_name;
|
||||
using File_name = Genode::String<256>;
|
||||
|
||||
static File_name _file_name(Genode::Xml_node const &config)
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ class Lx_fs::Root : public Root_component<Session_component>
|
||||
* Determine directory that is used as root directory of
|
||||
* the session.
|
||||
*/
|
||||
typedef String<256> Root;
|
||||
using Root = String<256>;
|
||||
Root const root = policy.attribute_value("root", Root());
|
||||
|
||||
/*
|
||||
|
@ -42,7 +42,7 @@ class Lx_fs::Node : public File_system::Node_base
|
||||
public:
|
||||
|
||||
using Path = Genode::Path<MAX_PATH_LEN>;
|
||||
typedef char Name[128];
|
||||
using Name = char[128];
|
||||
|
||||
private:
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <base/log.h>
|
||||
|
||||
|
||||
typedef Mixer::Channel Channel;
|
||||
using Channel = Mixer::Channel;
|
||||
|
||||
|
||||
static constexpr int LEFT = Channel::Number::LEFT;
|
||||
@ -94,7 +94,7 @@ namespace Audio_out
|
||||
class Mixer;
|
||||
|
||||
enum { MAX_CHANNEL_NAME_LEN = 16, MAX_LABEL_LEN = 128 };
|
||||
typedef Genode::String<MAX_LABEL_LEN> Label;
|
||||
using Label = Genode::String<MAX_LABEL_LEN>;
|
||||
}
|
||||
|
||||
|
||||
@ -673,7 +673,7 @@ class Audio_out::Session_component : public Audio_out::Session_elem
|
||||
|
||||
|
||||
namespace Audio_out {
|
||||
typedef Genode::Root_component<Session_component, Genode::Multiple_clients> Root_component;
|
||||
using Root_component = Genode::Root_component<Session_component, Genode::Multiple_clients>;
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ class Net::Session_component : private Net::Stream_allocator,
|
||||
|
||||
public:
|
||||
|
||||
typedef Genode::String<32> Ip_addr;
|
||||
using Ip_addr = Genode::String<32>;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -29,7 +29,7 @@ namespace Net {
|
||||
|
||||
using ::Nic::Packet_stream_sink;
|
||||
using ::Nic::Packet_stream_source;
|
||||
typedef ::Nic::Packet_descriptor Packet_descriptor;
|
||||
using Packet_descriptor = ::Nic::Packet_descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,8 +38,8 @@ namespace Block {
|
||||
|
||||
template <unsigned ITEMS> struct Job_queue;
|
||||
|
||||
typedef Constructible<Job> Job_object;
|
||||
using Response = Request_stream::Response;
|
||||
using Job_object = Constructible<Job>;
|
||||
using Response = Request_stream::Response;
|
||||
};
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace Block {
|
||||
using namespace Genode;
|
||||
|
||||
struct Job;
|
||||
typedef Block::Connection<Job> Block_connection;
|
||||
using Block_connection = Block::Connection<Job>;
|
||||
}
|
||||
|
||||
#endif /* _PART_BLOCK__TYPES_H_ */
|
||||
|
@ -23,12 +23,11 @@ namespace Rom_filter {
|
||||
|
||||
class Input_rom_registry;
|
||||
|
||||
typedef Genode::String<100> Input_rom_name;
|
||||
typedef Genode::String<100> Input_name;
|
||||
typedef Genode::String<100> Input_value;
|
||||
|
||||
typedef Genode::String<80> Node_type_name;
|
||||
typedef Genode::String<80> Attribute_name;
|
||||
using Input_rom_name = Genode::String<100>;
|
||||
using Input_name = Genode::String<100>;
|
||||
using Input_value = Genode::String<100>;
|
||||
using Node_type_name = Genode::String<80>;
|
||||
using Attribute_name = Genode::String<80>;
|
||||
|
||||
using Genode::Signal_context_capability;
|
||||
using Genode::Signal_handler;
|
||||
@ -96,7 +95,7 @@ class Rom_filter::Input_rom_registry
|
||||
Xml_node const &path,
|
||||
Xml_node const &content)
|
||||
{
|
||||
typedef Input_value Attribute_value;
|
||||
using Attribute_value = Input_value;
|
||||
|
||||
Xml_node sub_node = content.sub_node(type.string());
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Rom_filter {
|
||||
class Root;
|
||||
struct Main;
|
||||
|
||||
typedef Genode::List<Session_component> Session_list;
|
||||
using Session_list = Genode::List<Session_component>;
|
||||
}
|
||||
|
||||
|
||||
@ -294,7 +294,7 @@ void Rom_filter::Main::_evaluate_node(Xml_node node, Xml_generator &xml)
|
||||
|
||||
if (node.has_type("attribute")) {
|
||||
|
||||
typedef Genode::String<128> String;
|
||||
using String = Genode::String<128>;
|
||||
|
||||
/* assign input value to attribute value */
|
||||
if (node.has_attribute("input")) {
|
||||
|
@ -230,7 +230,7 @@ struct Tar_rom::Main
|
||||
|
||||
Attached_rom_dataspace _config { _env, "config" };
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
/**
|
||||
* Read name of tar archive from config
|
||||
|
@ -24,8 +24,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_open(Directory_service::Open_result r)
|
||||
{
|
||||
typedef Directory_service::Open_result Result;
|
||||
|
||||
using Result = Directory_service::Open_result;
|
||||
switch (r) {
|
||||
case Result::OPEN_ERR_NAME_TOO_LONG: throw Invalid_name();
|
||||
case Result::OPEN_ERR_UNACCESSIBLE: throw Lookup_failed();
|
||||
@ -40,8 +39,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_opendir(Directory_service::Opendir_result r)
|
||||
{
|
||||
typedef Directory_service::Opendir_result Result;
|
||||
|
||||
using Result = Directory_service::Opendir_result;
|
||||
switch (r) {
|
||||
case Result::OPENDIR_ERR_LOOKUP_FAILED: throw Lookup_failed();
|
||||
case Result::OPENDIR_ERR_NAME_TOO_LONG: throw Invalid_name();
|
||||
@ -56,8 +54,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_openlink(Directory_service::Openlink_result r)
|
||||
{
|
||||
typedef Directory_service::Openlink_result Result;
|
||||
|
||||
using Result = Directory_service::Openlink_result;
|
||||
switch (r) {
|
||||
case Result::OPENLINK_ERR_LOOKUP_FAILED: throw Lookup_failed();
|
||||
case Result::OPENLINK_ERR_NAME_TOO_LONG: throw Invalid_name();
|
||||
@ -72,8 +69,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_truncate(File_io_service::Ftruncate_result r)
|
||||
{
|
||||
typedef File_io_service::Ftruncate_result Result;
|
||||
|
||||
using Result = File_io_service::Ftruncate_result;
|
||||
switch (r) {
|
||||
case Result::FTRUNCATE_ERR_INTERRUPT: throw Invalid_handle();
|
||||
case Result::FTRUNCATE_ERR_NO_SPACE: throw No_space();
|
||||
@ -84,7 +80,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_unlink(Directory_service::Unlink_result r)
|
||||
{
|
||||
typedef Directory_service::Unlink_result Result;
|
||||
using Result = Directory_service::Unlink_result;
|
||||
switch (r) {
|
||||
case Result::UNLINK_ERR_NO_ENTRY: throw Lookup_failed();
|
||||
case Result::UNLINK_ERR_NO_PERM: throw Permission_denied();
|
||||
@ -95,7 +91,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_stat(Directory_service::Stat_result r)
|
||||
{
|
||||
typedef Directory_service::Stat_result Result;
|
||||
using Result = Directory_service::Stat_result;
|
||||
switch (r) {
|
||||
case Result::STAT_ERR_NO_ENTRY: throw Lookup_failed();
|
||||
case Result::STAT_ERR_NO_PERM: throw Permission_denied();
|
||||
@ -105,7 +101,7 @@ namespace File_system {
|
||||
|
||||
static inline void assert_rename(Directory_service::Rename_result r)
|
||||
{
|
||||
typedef Directory_service::Rename_result Result;
|
||||
using Result = Directory_service::Rename_result;
|
||||
switch (r) {
|
||||
case Result::RENAME_ERR_NO_ENTRY: throw Lookup_failed();
|
||||
case Result::RENAME_ERR_CROSS_FS: throw Permission_denied();
|
||||
|
@ -37,8 +37,8 @@ namespace Vfs_server {
|
||||
class Vfs_env;
|
||||
class Root;
|
||||
|
||||
typedef Genode::Fifo<Session_component> Session_queue;
|
||||
typedef Genode::Entrypoint::Io_progress_handler Io_progress_handler;
|
||||
using Session_queue = Genode::Fifo<Session_component>;
|
||||
using Io_progress_handler = Genode::Entrypoint::Io_progress_handler;
|
||||
|
||||
/**
|
||||
* Convenience utities for parsing quotas
|
||||
@ -152,7 +152,7 @@ class Vfs_server::Session_component : private Session_resources,
|
||||
Node_space::Id id { handle.value };
|
||||
|
||||
try { return _node_space.apply<Node>(id, [&] (Node &node) {
|
||||
typedef typename Node_type<HANDLE_TYPE>::Type Typed_node;
|
||||
using Typed_node = typename Node_type<HANDLE_TYPE>::Type;
|
||||
Typed_node *n = dynamic_cast<Typed_node *>(&node);
|
||||
if (!n)
|
||||
throw Invalid_handle();
|
||||
@ -511,7 +511,7 @@ class Vfs_server::Session_component : private Session_resources,
|
||||
if (!create && !_vfs.directory(path_str))
|
||||
throw Lookup_failed();
|
||||
|
||||
typedef Directory::Session_writeable Writeable;
|
||||
using Writeable = Directory::Session_writeable;
|
||||
|
||||
Directory &dir = *new (_alloc)
|
||||
Directory(_node_space, _vfs, _alloc, path_str, create,
|
||||
@ -582,7 +582,7 @@ class Vfs_server::Session_component : private Session_resources,
|
||||
path_str = sub_path.base();
|
||||
|
||||
Vfs::Vfs_watch_handle *vfs_handle = nullptr;
|
||||
typedef Directory_service::Watch_result Result;
|
||||
using Result = Directory_service::Watch_result;
|
||||
switch (_vfs.watch(path_str, &vfs_handle, _alloc)) {
|
||||
case Result::WATCH_OK: break;
|
||||
case Result::WATCH_ERR_UNACCESSIBLE:
|
||||
@ -825,7 +825,7 @@ class Vfs_server::Root : public Genode::Root_component<Session_component>,
|
||||
|
||||
_active_sessions.dequeue_all([&] (Session_component &session) {
|
||||
|
||||
typedef Session_component::Process_packets_result Result;
|
||||
using Result = Session_component::Process_packets_result;
|
||||
|
||||
switch (session.process_packets()) {
|
||||
|
||||
@ -901,7 +901,7 @@ class Vfs_server::Root : public Genode::Root_component<Session_component>,
|
||||
/* pull in policy changes */
|
||||
_config_rom.update();
|
||||
|
||||
typedef String<MAX_PATH_LEN> Root_path;
|
||||
using Root_path = String<MAX_PATH_LEN>;
|
||||
|
||||
Session_policy policy(label, _config_rom.xml());
|
||||
|
||||
|
@ -29,11 +29,10 @@ namespace Vfs_server {
|
||||
using namespace File_system;
|
||||
using namespace Vfs;
|
||||
|
||||
typedef Vfs::File_io_service::Write_result Write_result;
|
||||
typedef Vfs::File_io_service::Read_result Read_result;
|
||||
typedef Vfs::File_io_service::Sync_result Sync_result;
|
||||
|
||||
typedef ::File_system::Session::Tx::Sink Packet_stream;
|
||||
using Write_result = Vfs::File_io_service::Write_result;
|
||||
using Read_result = Vfs::File_io_service::Read_result;
|
||||
using Sync_result = Vfs::File_io_service::Sync_result;
|
||||
using Packet_stream = ::File_system::Session::Tx::Sink;
|
||||
|
||||
class Node;
|
||||
class Io_node;
|
||||
@ -42,15 +41,15 @@ namespace Vfs_server {
|
||||
class File;
|
||||
class Symlink;
|
||||
|
||||
typedef Genode::Id_space<Node> Node_space;
|
||||
typedef Genode::Fifo<Node> Node_queue;
|
||||
using Node_space = Genode::Id_space<Node>;
|
||||
using Node_queue = Genode::Fifo<Node>;
|
||||
|
||||
/* Vfs::MAX_PATH is shorter than File_system::MAX_PATH */
|
||||
enum { MAX_PATH_LEN = Vfs::MAX_PATH_LEN };
|
||||
|
||||
typedef Genode::Path<MAX_PATH_LEN> Path;
|
||||
using Path = Genode::Path<MAX_PATH_LEN>;
|
||||
|
||||
typedef Genode::Allocator::Out_of_memory Out_of_memory;
|
||||
using Out_of_memory = Genode::Allocator::Out_of_memory;
|
||||
|
||||
struct Payload_ptr { char *ptr; };
|
||||
|
||||
@ -58,21 +57,21 @@ namespace Vfs_server {
|
||||
* Type trait for determining the node type for a given handle type
|
||||
*/
|
||||
template<typename T> struct Node_type;
|
||||
template<> struct Node_type<Node_handle> { typedef Io_node Type; };
|
||||
template<> struct Node_type<Dir_handle> { typedef Directory Type; };
|
||||
template<> struct Node_type<File_handle> { typedef File Type; };
|
||||
template<> struct Node_type<Symlink_handle> { typedef Symlink Type; };
|
||||
template<> struct Node_type<Watch_handle> { typedef Watch_node Type; };
|
||||
template<> struct Node_type<Node_handle> { using Type = Io_node; };
|
||||
template<> struct Node_type<Dir_handle> { using Type = Directory; };
|
||||
template<> struct Node_type<File_handle> { using Type = File; };
|
||||
template<> struct Node_type<Symlink_handle> { using Type = Symlink; };
|
||||
template<> struct Node_type<Watch_handle> { using Type = Watch_node; };
|
||||
|
||||
/**
|
||||
* Type trait for determining the handle type for a given node type
|
||||
*/
|
||||
template<typename T> struct Handle_type;
|
||||
template<> struct Handle_type<Io_node> { typedef Node_handle Type; };
|
||||
template<> struct Handle_type<Directory> { typedef Dir_handle Type; };
|
||||
template<> struct Handle_type<File> { typedef File_handle Type; };
|
||||
template<> struct Handle_type<Symlink> { typedef Symlink_handle Type; };
|
||||
template<> struct Handle_type<Watch> { typedef Watch_handle Type; };
|
||||
template<> struct Handle_type<Io_node> { using Type = Node_handle; };
|
||||
template<> struct Handle_type<Directory> { using Type = Dir_handle; };
|
||||
template<> struct Handle_type<File> { using Type = File_handle; };
|
||||
template<> struct Handle_type<Symlink> { using Type = Symlink_handle; };
|
||||
template<> struct Handle_type<Watch> { using Type = Watch_handle; };
|
||||
|
||||
/*
|
||||
* Note that the file objects are created at the
|
||||
@ -584,7 +583,7 @@ struct Vfs_server::Symlink : Io_node
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Genode::String<MAX_PATH_LEN + 1> Write_buffer;
|
||||
using Write_buffer = Genode::String<MAX_PATH_LEN + 1>;
|
||||
|
||||
Write_buffer _write_buffer { };
|
||||
|
||||
@ -707,12 +706,12 @@ class Vfs_server::File : public Io_node
|
||||
|
||||
char const * const _leaf_path = nullptr; /* offset pointer to Node::_path */
|
||||
|
||||
typedef Directory_service::Stat Stat;
|
||||
using Stat = Directory_service::Stat;
|
||||
|
||||
template <typename FN>
|
||||
void _with_stat(FN const &fn)
|
||||
{
|
||||
typedef Directory_service::Stat_result Result;
|
||||
using Result = Directory_service::Stat_result;
|
||||
|
||||
Vfs::Directory_service::Stat stat { };
|
||||
if (_handle.ds().stat(_leaf_path, stat) == Result::STAT_OK)
|
||||
@ -864,8 +863,8 @@ struct Vfs_server::Directory : Io_node
|
||||
|
||||
Session_writeable const _writeable;
|
||||
|
||||
typedef Directory_service::Dirent Vfs_dirent;
|
||||
typedef ::File_system::Directory_entry Fs_dirent;
|
||||
using Vfs_dirent = Directory_service::Dirent;
|
||||
using Fs_dirent = ::File_system::Directory_entry;
|
||||
|
||||
bool _position_and_length_aligned_with_dirent_size()
|
||||
{
|
||||
|
@ -115,7 +115,7 @@ class Bomb_child : public Child_policy
|
||||
};
|
||||
|
||||
|
||||
typedef Registry<Registered<Bomb_child> > Children;
|
||||
using Children = Registry<Registered<Bomb_child> >;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -92,7 +92,7 @@ class Test::Subsystem
|
||||
|
||||
Env &_env;
|
||||
|
||||
typedef String<100> Label;
|
||||
using Label = String<100>;
|
||||
|
||||
Label _name;
|
||||
|
||||
@ -201,7 +201,7 @@ class Test::Subsystem
|
||||
{
|
||||
using namespace Genode;
|
||||
try {
|
||||
typedef String<100> String;
|
||||
using String = String<100>;
|
||||
|
||||
String const expected(str);
|
||||
String const imported = _imported_text().decoded_content<String>();
|
||||
|
@ -195,7 +195,7 @@ class Test::Input_to_filter
|
||||
Constructible<Event::Connection> _ps2 { };
|
||||
Constructible<Event::Connection> _usb { };
|
||||
|
||||
typedef String<20> Key_name;
|
||||
using Key_name = String<20>;
|
||||
|
||||
Input::Keycode _code(Key_name const &key_name)
|
||||
{
|
||||
@ -394,7 +394,7 @@ struct Test::Main : Input_from_filter::Event_handler
|
||||
}
|
||||
|
||||
if (step.type() == "message") {
|
||||
typedef String<80> Message;
|
||||
using Message = String<80>;
|
||||
Message const message = step.attribute_value("string", Message());
|
||||
log("\n--- ", message, " ---");
|
||||
_advance_step();
|
||||
@ -432,7 +432,7 @@ struct Test::Main : Input_from_filter::Event_handler
|
||||
*/
|
||||
void handle_event_from_filter(Input::Event const &ev) override
|
||||
{
|
||||
typedef Genode::String<20> Value;
|
||||
using Value = Genode::String<20>;
|
||||
|
||||
Xml_node const step = _curr_step_xml();
|
||||
|
||||
|
@ -51,7 +51,7 @@ struct Test::Main
|
||||
Constructible<Reporter> _devices_reporter { };
|
||||
Constructible<Reporter> _focus_reporter { };
|
||||
|
||||
typedef String<80> Version;
|
||||
using Version = String<80>;
|
||||
|
||||
void _report(Reporter &reporter, Version const &version)
|
||||
{
|
||||
|
@ -41,8 +41,8 @@ namespace Test {
|
||||
|
||||
static inline bool Test::xml_attribute_matches(Xml_node condition, Xml_node node)
|
||||
{
|
||||
typedef String<32> Name;
|
||||
typedef String<64> Value;
|
||||
using Name = String<32>;
|
||||
using Value = String<64>;
|
||||
|
||||
Name const name = condition.attribute_value("name", Name());
|
||||
|
||||
@ -81,7 +81,7 @@ static inline bool Test::xml_matches(Xml_node expected, Xml_node node)
|
||||
|
||||
if (condition.type() == "node") {
|
||||
|
||||
typedef String<32> Name;
|
||||
using Name = String<32>;
|
||||
Name const name = condition.attribute_value("name", Name());
|
||||
|
||||
bool at_least_one_sub_node_matches = false;
|
||||
@ -101,7 +101,7 @@ static inline bool Test::xml_matches(Xml_node expected, Xml_node node)
|
||||
|
||||
struct Test::Log_message_handler : Interface
|
||||
{
|
||||
typedef String<Log_session::MAX_STRING_LEN> Message;
|
||||
using Message = String<Log_session::MAX_STRING_LEN>;
|
||||
|
||||
enum Result { EXPECTED, UNEXPECTED, IGNORED };
|
||||
|
||||
@ -193,7 +193,7 @@ struct Test::Main : Log_message_handler
|
||||
|
||||
void _publish_report(Reporter &reporter, Xml_node node)
|
||||
{
|
||||
typedef String<64> Version;
|
||||
using Version = String<64>;
|
||||
Version const version = node.attribute_value("version", Version());
|
||||
|
||||
Reporter::Xml_generator xml(reporter, [&] () {
|
||||
@ -276,7 +276,7 @@ struct Test::Main : Log_message_handler
|
||||
}
|
||||
|
||||
if (step.type() == "message") {
|
||||
typedef String<80> Message;
|
||||
using Message = String<80>;
|
||||
Message const message = step.attribute_value("string", Message());
|
||||
log("\n--- ", message, " ---");
|
||||
_advance_step();
|
||||
|
@ -137,7 +137,7 @@ struct Test::Main
|
||||
|
||||
struct Ram_tracker
|
||||
{
|
||||
typedef String<32> Name;
|
||||
using Name = String<32>;
|
||||
|
||||
Name const _name;
|
||||
|
||||
@ -177,7 +177,7 @@ struct Test::Main
|
||||
return state.sub_node("ram").attribute_value("quota", Number_of_bytes());
|
||||
}
|
||||
|
||||
typedef String<32> Name;
|
||||
using Name = String<32>;
|
||||
|
||||
template <typename FN>
|
||||
void _apply_child(Xml_node state, Name const &name, FN const &fn)
|
||||
|
@ -41,7 +41,7 @@ struct Test::Base : Interface
|
||||
{
|
||||
public:
|
||||
|
||||
typedef String<64> Name;
|
||||
using Name = String<64>;
|
||||
|
||||
virtual void handle_nic() = 0;
|
||||
|
||||
@ -111,7 +111,7 @@ struct Test::Roundtrip : Base
|
||||
/*
|
||||
* Each character of the string is used as pattern for one iteration.
|
||||
*/
|
||||
typedef String<16> Patterns;
|
||||
using Patterns = String<16>;
|
||||
|
||||
Patterns const _patterns;
|
||||
|
||||
|
@ -21,7 +21,7 @@ struct Shape
|
||||
{
|
||||
enum { WIDTH = 16, HEIGHT = 16 };
|
||||
|
||||
typedef Genode::String<16> Id;
|
||||
using Id = Genode::String<16>;
|
||||
|
||||
Id const id;
|
||||
bool const visible;
|
||||
|
@ -307,7 +307,7 @@ class Test::Parent
|
||||
ref_pd(), _env.rm(),
|
||||
_config_producer };
|
||||
|
||||
typedef Genode::Local_service<Dynamic_rom_session> Config_service;
|
||||
using Config_service = Genode::Local_service<Dynamic_rom_session>;
|
||||
|
||||
Config_service::Single_session_factory _config_factory { _config_session };
|
||||
Config_service _config_service { _config_factory };
|
||||
|
@ -55,7 +55,7 @@ struct Test::Main : Sandbox::Local_service_base::Wakeup
|
||||
|
||||
Sandbox _sandbox { _env, _state_handler };
|
||||
|
||||
typedef Sandbox::Local_service<Log_session_component> Log_service;
|
||||
using Log_service = Sandbox::Local_service<Log_session_component>;
|
||||
|
||||
Log_service _log_service { _sandbox, *this };
|
||||
|
||||
|
@ -45,7 +45,7 @@ using namespace Genode;
|
||||
|
||||
inline void assert_open(Vfs::Directory_service::Open_result r)
|
||||
{
|
||||
typedef Vfs::Directory_service::Open_result Result;
|
||||
using Result = Vfs::Directory_service::Open_result;
|
||||
switch (r) {
|
||||
case Result::OPEN_OK: return;
|
||||
case Result::OPEN_ERR_NAME_TOO_LONG:
|
||||
@ -68,7 +68,7 @@ inline void assert_open(Vfs::Directory_service::Open_result r)
|
||||
|
||||
inline void assert_opendir(Vfs::Directory_service::Opendir_result r)
|
||||
{
|
||||
typedef Vfs::Directory_service::Opendir_result Result;
|
||||
using Result = Vfs::Directory_service::Opendir_result;
|
||||
switch (r) {
|
||||
case Result::OPENDIR_OK: return;
|
||||
case Result::OPENDIR_ERR_LOOKUP_FAILED:
|
||||
@ -91,7 +91,7 @@ inline void assert_opendir(Vfs::Directory_service::Opendir_result r)
|
||||
|
||||
inline void assert_write(Vfs::File_io_service::Write_result r)
|
||||
{
|
||||
typedef Vfs::File_io_service::Write_result Result;
|
||||
using Result = Vfs::File_io_service::Write_result;
|
||||
switch (r) {
|
||||
case Result::WRITE_OK: return;
|
||||
case Result::WRITE_ERR_WOULD_BLOCK:
|
||||
@ -106,7 +106,7 @@ inline void assert_write(Vfs::File_io_service::Write_result r)
|
||||
|
||||
inline void assert_read(Vfs::File_io_service::Read_result r)
|
||||
{
|
||||
typedef Vfs::File_io_service::Read_result Result;
|
||||
using Result = Vfs::File_io_service::Read_result;
|
||||
switch (r) {
|
||||
case Result::READ_OK: return;
|
||||
case Result::READ_QUEUED:
|
||||
@ -123,7 +123,7 @@ inline void assert_read(Vfs::File_io_service::Read_result r)
|
||||
|
||||
inline void assert_unlink(Vfs::Directory_service::Unlink_result r)
|
||||
{
|
||||
typedef Vfs::Directory_service::Unlink_result Result;
|
||||
using Result = Vfs::Directory_service::Unlink_result;
|
||||
switch (r) {
|
||||
case Result::UNLINK_OK: return;
|
||||
case Result::UNLINK_ERR_NO_ENTRY:
|
||||
@ -138,7 +138,7 @@ inline void assert_unlink(Vfs::Directory_service::Unlink_result r)
|
||||
|
||||
static int MAX_DEPTH;
|
||||
|
||||
typedef Genode::Path<Vfs::MAX_PATH_LEN> Path;
|
||||
using Path = Genode::Path<Vfs::MAX_PATH_LEN>;
|
||||
|
||||
|
||||
struct Stress_test
|
||||
@ -483,7 +483,7 @@ struct Unlink_test : public Stress_test
|
||||
:
|
||||
Stress_test(vfs, alloc, parent), _io(io)
|
||||
{
|
||||
typedef Vfs::Directory_service::Unlink_result Result;
|
||||
using Result = Vfs::Directory_service::Unlink_result;
|
||||
try {
|
||||
Result r = vfs.unlink(path.base());
|
||||
switch (r) {
|
||||
|
@ -516,8 +516,8 @@ void Vmm::Vcpu::_cpu_init(Vcpu_state & state)
|
||||
|
||||
/* http://www.sandpile.org/x86/initial.htm */
|
||||
|
||||
typedef Vcpu_state::Segment Segment;
|
||||
typedef Vcpu_state::Range Range;
|
||||
using Segment = Vcpu_state::Segment;
|
||||
using Range = Vcpu_state::Range;
|
||||
|
||||
state.flags.charge(2);
|
||||
state.ip. charge(0xfff0);
|
||||
|
Reference in New Issue
Block a user