Replace use of 'typedef' by 'using'

Issue #5227
This commit is contained in:
Norman Feske
2024-06-28 17:20:59 +02:00
parent 361557e1f0
commit 19c13877ca
442 changed files with 1306 additions and 1349 deletions

View File

@ -68,7 +68,7 @@ class Kernel::Cpu : public Core::Cpu, private Irq::Pool, private Timeout
{
private:
typedef Cpu_job Job;
using Job = Cpu_job;
/**
* Inter-processor-interrupt object of the cpu

View File

@ -191,7 +191,7 @@ void Signal_receiver::_listen()
return;
/* create a signal data-object */
typedef Genode::Signal_context * Signal_imprint;
using Signal_imprint = Genode::Signal_context *;
_deliver.dequeue([&] (Signal_context::Fifo_element &elem) {
auto const context = &elem.object();

View File

@ -59,7 +59,7 @@ class Kernel::Signal_handler
Signal_handler(Signal_handler const &);
Signal_handler &operator = (Signal_handler const &);
typedef Genode::Fifo_element<Signal_handler> Fifo_element;
using Fifo_element = Genode::Fifo_element<Signal_handler>;
Thread &_thread;
Fifo_element _handlers_fe { *this };
@ -119,7 +119,7 @@ class Kernel::Signal_context
Signal_context(Signal_context const &);
Signal_context &operator = (Signal_context const &);
typedef Genode::Fifo_element<Signal_context> Fifo_element;
using Fifo_element = Genode::Fifo_element<Signal_context>;
Kernel::Object _kernel_object { *this };
Fifo_element _deliver_fe { *this };
@ -226,7 +226,7 @@ class Kernel::Signal_receiver
private:
typedef Genode::Signal Signal;
using Signal = Genode::Signal;
template <typename T> class Fifo : public Genode::Fifo<T> { };

View File

@ -53,7 +53,7 @@ class Core::Platform_thread : Noncopyable
Platform_thread(Platform_thread const &);
Platform_thread &operator = (Platform_thread const &);
typedef String<32> Label;
using Label = String<32>;
Label const _label;
Platform_pd &_pd;

View File

@ -27,8 +27,8 @@ namespace Core {
class Signal_context_component;
class Signal_source_component;
typedef Object_pool<Signal_context_component> Signal_context_pool;
typedef Object_pool<Signal_source_component> Signal_source_pool;
using Signal_context_pool = Object_pool<Signal_context_component>;
using Signal_source_pool = Object_pool<Signal_source_component>;
}

View File

@ -44,7 +44,7 @@ namespace Core {
*/
class Cpu;
typedef __uint128_t sizet_arithm_t;
using sizet_arithm_t = __uint128_t;
}

View File

@ -487,10 +487,10 @@ void Vmcs::prepare_vmcs()
void Vmcs::write_vcpu_state(Genode::Vcpu_state &state)
{
typedef Genode::Vcpu_state::Range Range;
typedef Genode::Vcpu_state::Segment Segment;
using Range = Genode::Vcpu_state::Range;
using Segment = Genode::Vcpu_state::Segment;
using Cpu = Hw::X86_64_cpu;
using Cpu = Hw::X86_64_cpu;
using Genode::uint16_t;
using Genode::uint32_t;

View File

@ -42,7 +42,7 @@ class Core::Vm_session_component
{
private:
typedef Allocator_avl_tpl<Rm_region> Avl_region;
using Avl_region = Allocator_avl_tpl<Rm_region>;
/*
* Noncopyable

View File

@ -378,7 +378,7 @@ void Hw::for_each_rsdt_entry(Hw::Acpi_generic &rsdt, auto const &fn)
if (Genode::memcmp(rsdt.signature, "RSDT", 4))
return;
typedef Genode::uint32_t entry_t;
using entry_t = Genode::uint32_t;
unsigned const table_size = rsdt.size;
unsigned const entry_count = (unsigned)((table_size - sizeof(rsdt)) / sizeof(entry_t));
@ -394,7 +394,7 @@ void Hw::for_each_xsdt_entry(Hw::Acpi_generic &xsdt, auto const &fn)
if (Genode::memcmp(xsdt.signature, "XSDT", 4))
return;
typedef Genode::uint64_t entry_t;
using entry_t = Genode::uint64_t;
unsigned const table_size = xsdt.size;
unsigned const entry_count = (unsigned)((table_size - sizeof(xsdt)) / sizeof(entry_t));