From 19c13877caec99d9af927f51a53504d79e2488b6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 28 Jun 2024 17:20:59 +0200 Subject: [PATCH] Replace use of 'typedef' by 'using' Issue #5227 --- repos/base-fiasco/src/core/include/platform.h | 2 +- .../include/base/internal/rpc_destination.h | 2 +- repos/base-foc/src/core/include/platform.h | 2 +- .../src/core/include/platform_thread.h | 2 +- .../src/core/include/vm_session_component.h | 6 +- .../src/include/base/internal/cap_map.h | 2 +- repos/base-foc/src/lib/base/x86/vm.cc | 8 +- repos/base-hw/src/core/kernel/cpu.h | 2 +- .../src/core/kernel/signal_receiver.cc | 2 +- .../base-hw/src/core/kernel/signal_receiver.h | 6 +- repos/base-hw/src/core/platform_thread.h | 2 +- .../src/core/signal_source_component.h | 4 +- repos/base-hw/src/core/spec/riscv/cpu.h | 2 +- .../spec/x86_64/virtualization/kernel/vmx.cc | 6 +- repos/base-hw/src/core/vm_session_component.h | 2 +- .../base-hw/src/include/hw/spec/x86_64/acpi.h | 4 +- .../include/spec/arm_64/trace/timestamp.h | 2 +- .../base/internal/capability_space_tpl.h | 2 +- repos/base-linux/src/lib/base/ipc.cc | 2 +- .../base-linux/src/lib/lx_hybrid/lx_hybrid.cc | 2 +- .../base-nova/include/nova/capability_space.h | 2 +- repos/base-nova/src/core/include/nova_util.h | 2 +- .../src/core/include/vm_session_component.h | 4 +- .../base-nova/src/lib/base/rpc_entrypoint.cc | 2 +- repos/base-nova/src/lib/base/vm.cc | 6 +- repos/base-nova/src/test/nova/server.h | 2 +- .../include/base/internal/rpc_destination.h | 2 +- .../src/core/include/platform.h | 2 +- .../src/core/include/platform_thread.h | 2 +- .../include/base/internal/rpc_destination.h | 2 +- repos/base-sel4/src/core/include/cnode.h | 2 +- repos/base-sel4/src/core/include/platform.h | 2 +- .../src/core/include/vm_session_component.h | 2 +- repos/base-sel4/src/core/platform.cc | 2 +- .../base/internal/capability_space_sel4.h | 2 +- repos/base-sel4/src/lib/base/x86/vm.cc | 4 +- repos/base/include/base/allocator_avl.h | 2 +- repos/base/include/base/capability.h | 6 +- repos/base/include/base/child.h | 14 +-- repos/base/include/base/ipc_msgbuf.h | 2 +- repos/base/include/base/local_connection.h | 4 +- repos/base/include/base/log.h | 7 +- repos/base/include/base/quota_guard.h | 8 +- repos/base/include/base/ram_allocator.h | 2 +- repos/base/include/base/rpc.h | 45 ++++---- repos/base/include/base/rpc_client.h | 6 +- repos/base/include/base/rpc_server.h | 18 ++-- repos/base/include/base/service.h | 8 +- repos/base/include/base/session_object.h | 6 +- repos/base/include/base/session_state.h | 4 +- repos/base/include/base/shared_object.h | 6 +- repos/base/include/base/signal.h | 2 +- repos/base/include/base/thread.h | 6 +- repos/base/include/cpu/string.h | 2 +- repos/base/include/cpu_session/capability.h | 2 +- repos/base/include/dataspace/capability.h | 2 +- .../base/include/io_mem_session/capability.h | 2 +- .../include/io_mem_session/io_mem_session.h | 2 +- .../base/include/io_port_session/capability.h | 2 +- repos/base/include/irq_session/capability.h | 2 +- repos/base/include/log_session/capability.h | 2 +- repos/base/include/log_session/log_session.h | 4 +- repos/base/include/parent/capability.h | 2 +- repos/base/include/parent/parent.h | 20 ++-- repos/base/include/pd_session/capability.h | 2 +- repos/base/include/pd_session/pd_session.h | 2 +- repos/base/include/rm_session/capability.h | 2 +- repos/base/include/rom_session/capability.h | 2 +- repos/base/include/rom_session/rom_session.h | 4 +- repos/base/include/root/capability.h | 2 +- repos/base/include/root/root.h | 6 +- repos/base/include/session/capability.h | 2 +- repos/base/include/session/session.h | 2 +- .../include/spec/arm_64/trace/timestamp.h | 2 +- .../include/spec/arm_v6/trace/timestamp.h | 2 +- .../include/spec/arm_v7/trace/timestamp.h | 2 +- .../base/include/spec/riscv/trace/timestamp.h | 2 +- .../include/spec/x86_32/trace/timestamp.h | 2 +- .../include/spec/x86_64/trace/timestamp.h | 2 +- repos/base/include/timer_session/capability.h | 2 +- .../include/timer_session/timer_session.h | 2 +- repos/base/include/util/arg_string.h | 4 +- repos/base/include/util/avl_tree.h | 2 +- repos/base/include/util/meta.h | 86 +++++++-------- repos/base/include/util/register.h | 37 ++++--- repos/base/include/util/register_set.h | 101 ++++++++---------- repos/base/include/util/string.h | 2 +- repos/base/include/util/xml_node.h | 12 +-- repos/base/src/core/include/account.h | 2 +- .../src/core/include/cpu_thread_allocator.h | 4 +- .../src/core/include/cpu_thread_component.h | 2 +- .../include/pager_object_exception_state.h | 2 +- .../src/core/include/pd_session_component.h | 4 +- .../src/core/include/ram_dataspace_factory.h | 2 +- .../src/core/include/region_map_component.h | 3 +- .../core/include/signal_source_component.h | 2 +- .../src/core/include/trace/subject_registry.h | 2 +- repos/base/src/core/signal_receiver.cc | 2 +- .../base/internal/capability_space_tpl.h | 2 +- .../src/include/base/internal/elf_format.h | 60 +++++------ .../src/include/base/internal/ipc_server.h | 2 +- repos/base/src/include/base/internal/stack.h | 2 +- .../base/internal/upgradeable_client.h | 2 +- repos/base/src/lib/base/default_log.cc | 3 +- repos/base/src/lib/base/raw_output.cc | 2 +- repos/base/src/lib/base/root_proxy.cc | 6 +- repos/base/src/lib/base/session_state.cc | 2 +- repos/base/src/lib/cxx/guard.cc | 4 +- repos/base/src/lib/cxx/malloc_free.cc | 2 +- repos/base/src/lib/ldso/include/config.h | 2 +- repos/base/src/lib/ldso/include/elf.h | 52 ++++----- repos/base/src/lib/ldso/include/file.h | 2 +- repos/base/src/lib/ldso/include/linker.h | 2 +- repos/base/src/lib/ldso/include/region_map.h | 2 +- repos/base/src/lib/ldso/spec/arm/relocation.h | 8 +- .../src/lib/ldso/spec/arm_64/relocation.h | 8 +- .../base/src/lib/ldso/spec/riscv/relocation.h | 8 +- .../src/lib/ldso/spec/x86_32/relocation.h | 8 +- .../src/lib/ldso/spec/x86_64/relocation.h | 8 +- repos/base/src/test/log/main.cc | 2 +- repos/base/src/test/mmio/main.cc | 4 +- repos/base/src/test/registry/main.cc | 2 +- repos/base/src/test/rm_fault/main.cc | 4 +- repos/base/src/test/smp/main.cc | 2 +- repos/base/src/test/token/main.cc | 2 +- .../dde_linux/src/driver/usb_hid/led_state.h | 6 +- repos/dde_linux/src/driver/wifi/util.h | 8 +- .../src/lib/lxip/genode_c_api/nic_client.cc | 4 +- repos/dde_linux/src/lib/lxip/socket.cc | 2 +- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 24 ++--- .../dde_rump/src/include/util/allocator_fap.h | 8 +- repos/dde_rump/src/lib/rump/bootstrap.cc | 8 +- repos/dde_rump/src/lib/rump/hypercall.cc | 2 +- repos/dde_rump/src/lib/rump/io.cc | 2 +- repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 8 +- repos/demo/include/launchpad/launchpad.h | 16 ++- repos/demo/include/scout/canvas.h | 2 +- .../include/scout/graphics_backend_impl.h | 12 +-- repos/demo/include/scout/platform.h | 6 +- repos/demo/include/scout/tick.h | 2 +- repos/demo/include/scout/types.h | 6 +- .../scout_gfx/horizontal_shadow_painter.h | 2 +- repos/demo/include/scout_gfx/icon_painter.h | 4 +- .../scout_gfx/refracted_icon_painter.h | 6 +- .../include/scout_gfx/sky_texture_painter.h | 6 +- repos/demo/src/app/launchpad/loadbar.h | 2 +- repos/demo/src/app/launchpad/section.h | 2 +- repos/demo/src/app/scout/elements.h | 4 +- repos/demo/src/lib/launchpad/launchpad.cc | 4 +- .../src/server/liquid_framebuffer/main.cc | 2 +- .../src/server/liquid_framebuffer/services.cc | 2 +- repos/demo/src/server/nitlog/main.cc | 14 +-- repos/gems/include/ctf/timestamp.h | 4 +- repos/gems/include/depot/archive.h | 10 +- repos/gems/include/gems/animated_geometry.h | 6 +- repos/gems/include/gems/cached_font.h | 8 +- repos/gems/include/gems/chunky_texture.h | 2 +- repos/gems/include/gems/gui_buffer.h | 22 ++-- repos/gems/include/gems/ttf_font.h | 11 +- repos/gems/include/gems/vfs_font.h | 8 +- repos/gems/include/gems/xml_anchor.h | 2 +- repos/gems/include/nano3d/cube_shape.h | 4 +- .../gems/include/nano3d/dodecahedron_shape.h | 2 +- repos/gems/include/nano3d/scene.h | 10 +- repos/gems/include/nano3d/vertex_array.h | 2 +- repos/gems/include/polygon_gfx/clipping.h | 8 +- repos/gems/include/polygon_gfx/line_painter.h | 4 +- .../polygon_gfx/polygon_painter_base.h | 6 +- repos/gems/src/app/backdrop/main.cc | 14 +-- repos/gems/src/app/decorator/canvas.h | 2 +- repos/gems/src/app/decorator/config.h | 2 +- repos/gems/src/app/decorator/window.h | 6 +- repos/gems/src/app/depot_autopilot/child.cc | 8 +- repos/gems/src/app/depot_autopilot/child.h | 14 +-- repos/gems/src/app/depot_autopilot/main.cc | 4 +- repos/gems/src/app/depot_deploy/child.h | 18 ++-- .../depot_download_manager/gen_depot_query.cc | 2 +- .../app/depot_download_manager/gen_extract.cc | 2 +- .../depot_download_manager/gen_fetchurl.cc | 6 +- .../app/depot_download_manager/gen_verify.cc | 2 +- .../src/app/depot_download_manager/main.cc | 2 +- .../src/app/depot_download_manager/types.h | 6 +- repos/gems/src/app/depot_query/main.cc | 6 +- repos/gems/src/app/depot_query/main.h | 8 +- repos/gems/src/app/fs_tool/main.cc | 2 +- repos/gems/src/app/menu_view/cursor.h | 2 +- .../gems/src/app/menu_view/depgraph_widget.h | 8 +- repos/gems/src/app/menu_view/label_widget.h | 2 +- repos/gems/src/app/menu_view/style_database.h | 8 +- repos/gems/src/app/menu_view/text_selection.h | 2 +- repos/gems/src/app/menu_view/widget.h | 2 +- .../gems/src/app/mixer_gui_qt/main_window.cpp | 2 +- repos/gems/src/app/nano3d/main.cc | 6 +- repos/gems/src/app/sculpt_manager/deploy.cc | 6 +- repos/gems/src/app/sculpt_manager/deploy.h | 4 +- repos/gems/src/app/sculpt_manager/main.cc | 2 +- .../app/sculpt_manager/model/access_point.h | 6 +- .../src/app/sculpt_manager/model/capacity.h | 2 +- .../sculpt_manager/model/child_exit_state.h | 4 +- .../src/app/sculpt_manager/model/component.h | 8 +- .../app/sculpt_manager/model/download_queue.h | 2 +- .../src/app/sculpt_manager/model/nic_state.h | 2 +- .../src/app/sculpt_manager/model/partition.h | 6 +- .../app/sculpt_manager/model/runtime_config.h | 4 +- .../sculpt_manager/model/usb_storage_device.h | 6 +- .../src/app/sculpt_manager/runtime/update.cc | 2 +- repos/gems/src/app/sculpt_manager/types.h | 12 +-- repos/gems/src/app/text_area/main.cc | 2 +- repos/gems/src/app/themed_decorator/config.h | 2 +- repos/gems/src/app/themed_decorator/theme.cc | 6 +- repos/gems/src/app/themed_decorator/theme.h | 14 +-- .../src/app/themed_decorator/tint_painter.h | 2 +- repos/gems/src/app/themed_decorator/window.h | 6 +- repos/gems/src/app/trace_recorder/monitor.cc | 2 +- repos/gems/src/app/vfs_replay/component.cc | 2 +- repos/gems/src/app/window_layouter/assign.h | 2 +- .../window_layouter/key_sequence_tracker.h | 4 +- repos/gems/src/app/window_layouter/main.cc | 2 +- repos/gems/src/app/window_layouter/target.h | 2 +- repos/gems/src/app/window_layouter/types.h | 6 +- repos/gems/src/app/window_layouter/window.h | 4 +- repos/gems/src/lib/ttf_font/ttf_font.cc | 2 +- repos/gems/src/lib/vfs/gpu/vfs.cc | 2 +- repos/gems/src/lib/vfs/pipe/plugin.cc | 23 ++-- repos/gems/src/lib/vfs/trace/vfs.cc | 7 +- repos/gems/src/lib/vfs/tresor_crypto/vfs.cc | 4 +- .../gems/src/lib/vfs/ttf/glyphs_file_system.h | 8 +- repos/gems/src/lib/vfs/ttf/vfs.cc | 8 +- .../cpu_sampler/cpu_session_component.h | 5 +- repos/gems/src/server/file_terminal/main.cc | 2 +- .../server/gui_fader/alpha_dither_painter.h | 7 +- repos/gems/src/server/gui_fader/main.cc | 18 ++-- repos/gems/src/server/tcp_terminal/main.cc | 2 +- repos/gems/src/server/terminal/font_family.h | 2 +- repos/gems/src/server/terminal/main.cc | 6 +- .../src/server/terminal/text_screen_surface.h | 4 +- repos/gems/src/server/terminal/types.h | 6 +- repos/gems/src/server/wm/gui.h | 9 +- repos/gems/src/server/wm/window_registry.h | 10 +- repos/gems/src/test/decorator_stress/main.cc | 6 +- repos/gems/src/test/text_painter/main.cc | 8 +- repos/gems/src/test/tiled_wm/manager/main.cc | 2 +- repos/gems/src/test/tiled_wm/util.h | 2 +- repos/libports/src/app/acpica/os.cc | 2 +- repos/libports/src/app/extract/main.cc | 8 +- repos/libports/src/app/fetchurl/component.cc | 4 +- repos/libports/src/app/pdf_view/main.cc | 8 +- repos/libports/src/lib/gcov/libc/libc.cc | 4 +- repos/libports/src/lib/libc/execve.cc | 4 +- .../libports/src/lib/libc/file_operations.cc | 2 +- repos/libports/src/lib/libc/fork.cc | 20 ++-- repos/libports/src/lib/libc/getpwent.cc | 2 +- .../libports/src/lib/libc/internal/fd_alloc.h | 4 +- .../src/lib/libc/internal/file_operations.h | 2 +- repos/libports/src/lib/libc/internal/init.h | 2 +- repos/libports/src/lib/libc/internal/kernel.h | 4 +- .../lib/libc/internal/malloc_ram_allocator.h | 2 +- repos/libports/src/lib/libc/internal/plugin.h | 4 +- repos/libports/src/lib/libc/internal/types.h | 4 +- repos/libports/src/lib/libc/kernel.cc | 6 +- repos/libports/src/lib/libc/malloc.cc | 4 +- .../libports/src/lib/libc/socket_fs_plugin.cc | 6 +- repos/libports/src/lib/libc/time.cc | 2 +- repos/libports/src/lib/libc/vfs_plugin.cc | 42 ++++---- repos/libports/src/lib/libyuv/memory.cc | 2 +- .../qgenodeviewwidget/qgenodeviewwidget.cpp | 4 +- repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc | 9 +- repos/libports/src/lib/vfs/lwip/nic_netif.h | 4 +- repos/libports/src/lib/vfs/lwip/vfs.cc | 34 +++--- .../libports/src/test/libc_vfs_block/main.cc | 4 +- repos/libports/src/test/netty/netty.h | 2 +- .../os/include/audio_in_session/capability.h | 2 +- .../os/include/audio_out_session/capability.h | 2 +- repos/os/include/blit/painter.h | 4 +- repos/os/include/block/request.h | 8 +- repos/os/include/block/request_stream.h | 6 +- .../os/include/block_session/block_session.h | 14 +-- repos/os/include/block_session/capability.h | 2 +- repos/os/include/block_session/connection.h | 12 +-- repos/os/include/decorator/types.h | 9 +- repos/os/include/decorator/window.h | 6 +- repos/os/include/file_system/listener.h | 2 +- repos/os/include/file_system/node.h | 2 +- .../include/file_system_session/capability.h | 2 +- .../file_system_session/file_system_session.h | 32 +++--- .../include/framebuffer_session/capability.h | 2 +- .../framebuffer_session/framebuffer_session.h | 2 +- repos/os/include/gpio/config.h | 2 +- repos/os/include/gpio_session/capability.h | 2 +- repos/os/include/gpu_session/capability.h | 2 +- repos/os/include/gui_session/capability.h | 5 +- repos/os/include/i2c_session/capability.h | 2 +- repos/os/include/init/child_policy.h | 2 +- repos/os/include/input/event.h | 2 +- repos/os/include/input/event_queue.h | 4 +- repos/os/include/input/keycodes.h | 2 +- repos/os/include/input_session/capability.h | 2 +- repos/os/include/mixer/channel.h | 12 +-- repos/os/include/nic/packet_allocator.h | 2 +- repos/os/include/nic_session/capability.h | 2 +- repos/os/include/nic_session/nic_session.h | 10 +- repos/os/include/nitpicker_gfx/box_painter.h | 2 +- .../os/include/nitpicker_gfx/glyph_painter.h | 4 +- repos/os/include/nitpicker_gfx/text_painter.h | 15 ++- .../include/nitpicker_gfx/texture_painter.h | 4 +- repos/os/include/nitpicker_gfx/tff_font.h | 9 +- repos/os/include/os/dynamic_rom_session.h | 2 +- repos/os/include/os/handle_registry.h | 2 +- repos/os/include/os/packet_stream.h | 34 +++--- repos/os/include/os/pixel_alpha8.h | 5 +- repos/os/include/os/pixel_rgb565.h | 5 +- repos/os/include/os/pixel_rgb888.h | 5 +- repos/os/include/os/reporter.h | 6 +- repos/os/include/os/ring_buffer.h | 6 +- repos/os/include/os/session_policy.h | 4 +- repos/os/include/os/session_requester.h | 4 +- repos/os/include/os/vfs.h | 13 ++- repos/os/include/packet_stream_rx/client.h | 12 +-- .../packet_stream_rx/packet_stream_rx.h | 4 +- repos/os/include/packet_stream_tx/client.h | 12 +-- .../packet_stream_tx/packet_stream_tx.h | 4 +- .../os/include/platform_session/capability.h | 2 +- repos/os/include/platform_session/device.h | 4 +- .../platform_session/platform_session.h | 2 +- repos/os/include/ram_fs/chunk.h | 8 +- repos/os/include/report_rom/rom_module.h | 8 +- .../include/report_session/report_session.h | 2 +- repos/os/include/terminal/cell_array.h | 2 +- repos/os/include/trace/policy.h | 2 +- repos/os/include/uplink_session/capability.h | 5 +- .../include/uplink_session/uplink_session.h | 10 +- repos/os/include/util/dirty_rect.h | 4 +- repos/os/include/vfs/dir_file_system.h | 6 +- repos/os/include/vfs/file_system_factory.h | 6 +- .../include/vfs/readonly_value_file_system.h | 10 +- repos/os/include/vfs/single_file_system.h | 2 +- repos/os/include/vfs/types.h | 6 +- repos/os/include/vfs/value_file_system.h | 6 +- repos/os/include/virtio/queue.h | 2 +- repos/os/src/app/block_tester/main.cc | 4 +- repos/os/src/app/block_tester/test_replay.h | 2 +- repos/os/src/app/cpu_burner/main.cc | 2 +- repos/os/src/app/dummy/main.cc | 6 +- repos/os/src/app/global_keys_handler/main.cc | 14 +-- repos/os/src/app/nit_focus/main.cc | 2 +- repos/os/src/app/pointer/main.cc | 4 +- repos/os/src/app/rom_logger/main.cc | 4 +- repos/os/src/app/rom_reporter/main.cc | 2 +- repos/os/src/app/rom_to_file/main.cc | 2 +- repos/os/src/app/status_bar/main.cc | 14 +-- repos/os/src/app/trace_logger/monitor.cc | 4 +- .../os/src/app/trace_subject_reporter/main.cc | 2 +- repos/os/src/driver/ahci/ahci.h | 25 +++-- repos/os/src/driver/ahci/ata_protocol.h | 4 +- repos/os/src/driver/audio/spec/linux/main.cc | 4 +- .../src/driver/framebuffer/virtio/component.h | 2 +- repos/os/src/driver/input/virtio/component.h | 4 +- repos/os/src/driver/nic/virtio/component.h | 4 +- repos/os/src/driver/ps2/led_state.h | 6 +- repos/os/src/driver/uart/uart_component.h | 2 +- .../lib/genode_c_api/mac_address_reporter.cc | 2 +- repos/os/src/lib/genode_c_api/uplink.cc | 4 +- repos/os/src/lib/sandbox/alias.h | 4 +- repos/os/src/lib/sandbox/child.cc | 6 +- repos/os/src/lib/sandbox/child.h | 14 +-- repos/os/src/lib/sandbox/config_model.cc | 2 +- repos/os/src/lib/sandbox/config_model.h | 6 +- repos/os/src/lib/sandbox/name_registry.h | 2 +- repos/os/src/lib/sandbox/route_model.h | 2 +- repos/os/src/lib/sandbox/server.cc | 6 +- repos/os/src/lib/sandbox/service.h | 2 +- repos/os/src/lib/sandbox/state_reporter.h | 2 +- repos/os/src/lib/sandbox/types.h | 8 +- repos/os/src/lib/sandbox/utils.h | 4 +- repos/os/src/lib/vfs/block_file_system.h | 4 +- repos/os/src/lib/vfs/capture/plugin.cc | 14 +-- repos/os/src/lib/vfs/fs_file_system.h | 8 +- repos/os/src/lib/vfs/log_file_system.h | 2 +- repos/os/src/lib/vfs/ram_file_system.h | 12 +-- repos/os/src/lib/vfs/rom_file_system.h | 6 +- repos/os/src/lib/vfs/rtc_file_system.h | 4 +- repos/os/src/lib/vfs/symlink_file_system.h | 2 +- repos/os/src/lib/vfs/tap/vfs_tap.cc | 4 +- repos/os/src/lib/vfs/tar_file_system.h | 4 +- repos/os/src/lib/vfs/terminal_file_system.h | 16 +-- repos/os/src/monitor/gdb_stub.h | 2 +- repos/os/src/server/black_hole/audio_in.h | 2 +- repos/os/src/server/black_hole/audio_out.h | 2 +- repos/os/src/server/black_hole/capture.h | 2 +- repos/os/src/server/cached_fs_rom/main.cc | 14 +-- .../server/cached_fs_rom/session_requests.h | 6 +- repos/os/src/server/chroot/component.cc | 6 +- repos/os/src/server/clipboard/main.cc | 4 +- repos/os/src/server/cpu_balancer/component.cc | 4 +- repos/os/src/server/cpu_balancer/config.cc | 4 +- repos/os/src/server/cpu_balancer/policy.h | 8 +- repos/os/src/server/cpu_balancer/session.h | 8 +- repos/os/src/server/dynamic_rom/main.cc | 6 +- .../src/server/event_filter/chargen_source.h | 12 +-- .../src/server/event_filter/event_session.h | 2 +- .../server/event_filter/include_accessor.h | 4 +- .../server/event_filter/key_code_by_name.h | 2 +- repos/os/src/server/event_filter/log_source.h | 2 +- repos/os/src/server/event_filter/main.cc | 2 +- repos/os/src/server/fs_report/main.cc | 8 +- repos/os/src/server/fs_rom/main.cc | 6 +- repos/os/src/server/gui_fb/main.cc | 14 +-- repos/os/src/server/log_terminal/main.cc | 2 +- repos/os/src/server/lx_block/main.cc | 2 +- repos/os/src/server/lx_fs/main.cc | 2 +- repos/os/src/server/lx_fs/node.h | 2 +- repos/os/src/server/mixer/mixer.cc | 6 +- repos/os/src/server/nic_bridge/component.h | 2 +- .../os/src/server/nic_bridge/packet_handler.h | 2 +- repos/os/src/server/part_block/main.cc | 4 +- repos/os/src/server/part_block/types.h | 2 +- .../server/rom_filter/input_rom_registry.h | 13 ++- repos/os/src/server/rom_filter/main.cc | 4 +- repos/os/src/server/tar_rom/main.cc | 2 +- repos/os/src/server/vfs/assert.h | 18 ++-- repos/os/src/server/vfs/main.cc | 14 +-- repos/os/src/server/vfs/node.h | 47 ++++---- repos/os/src/test/bomb/main.cc | 2 +- repos/os/src/test/clipboard/main.cc | 4 +- repos/os/src/test/event_filter/main.cc | 6 +- repos/os/src/test/fs_report/main.cc | 2 +- repos/os/src/test/init/main.cc | 12 +-- repos/os/src/test/init_loop/main.cc | 4 +- repos/os/src/test/nic_loopback/main.cc | 4 +- repos/os/src/test/pointer/main.cc | 2 +- repos/os/src/test/resource_yield/main.cc | 2 +- repos/os/src/test/sandbox/main.cc | 2 +- repos/os/src/test/vfs_stress/main.cc | 14 +-- repos/os/src/test/vmm_x86/component.cc | 4 +- .../src/driver/framebuffer/intel/pc/main.cc | 4 +- repos/ports/src/app/verify/main.cc | 4 +- repos/ports/src/virtualbox6/include/fb.h | 14 +-- repos/ports/src/virtualbox6/input_adapter.h | 2 +- repos/ports/src/virtualbox6/main.cc | 4 +- repos/ports/src/virtualbox6/nem.cc | 2 +- repos/ports/src/virtualbox6/sup_vcpu_svm.h | 2 +- repos/ports/src/virtualbox6/sup_vcpu_vmx.h | 2 +- 442 files changed, 1306 insertions(+), 1349 deletions(-) diff --git a/repos/base-fiasco/src/core/include/platform.h b/repos/base-fiasco/src/core/include/platform.h index 4a1ef377ba..4a4e61d163 100644 --- a/repos/base-fiasco/src/core/include/platform.h +++ b/repos/base-fiasco/src/core/include/platform.h @@ -45,7 +45,7 @@ class Core::Platform : public Platform_generic /* * Shortcut for the type of allocator instances for physical resources */ - typedef Synced_range_allocator Phys_allocator; + using Phys_allocator = Synced_range_allocator; char _core_label[1]; /* to satisfy _core_pd */ Platform_pd *_core_pd = nullptr; /* core protection domain object */ diff --git a/repos/base-fiasco/src/include/base/internal/rpc_destination.h b/repos/base-fiasco/src/include/base/internal/rpc_destination.h index 9458ef750c..c73e2ab4c0 100644 --- a/repos/base-fiasco/src/include/base/internal/rpc_destination.h +++ b/repos/base-fiasco/src/include/base/internal/rpc_destination.h @@ -19,7 +19,7 @@ namespace Genode { - typedef Fiasco::l4_threadid_t Rpc_destination; + using Rpc_destination = Fiasco::l4_threadid_t; static inline Rpc_destination invalid_rpc_destination() { diff --git a/repos/base-foc/src/core/include/platform.h b/repos/base-foc/src/core/include/platform.h index 6f3242a399..071e9d4951 100644 --- a/repos/base-foc/src/core/include/platform.h +++ b/repos/base-foc/src/core/include/platform.h @@ -62,7 +62,7 @@ class Core::Platform : public Platform_generic /* * Shortcut for the type of allocator instances for physical resources */ - typedef Synced_range_allocator Phys_allocator; + using Phys_allocator = Synced_range_allocator; Platform_pd *_core_pd = nullptr; /* core protection domain object */ Phys_allocator _ram_alloc; /* RAM allocator */ diff --git a/repos/base-foc/src/core/include/platform_thread.h b/repos/base-foc/src/core/include/platform_thread.h index e9580dab31..4d2d94dfd6 100644 --- a/repos/base-foc/src/core/include/platform_thread.h +++ b/repos/base-foc/src/core/include/platform_thread.h @@ -45,7 +45,7 @@ class Core::Platform_thread : Interface enum State { DEAD, RUNNING }; - typedef String<32> Name; + using Name = String<32>; friend class Platform_pd; diff --git a/repos/base-foc/src/core/include/vm_session_component.h b/repos/base-foc/src/core/include/vm_session_component.h index 6ec5602d24..17c3a1f01e 100644 --- a/repos/base-foc/src/core/include/vm_session_component.h +++ b/repos/base-foc/src/core/include/vm_session_component.h @@ -35,7 +35,7 @@ namespace Core { enum { MAX_VCPU_IDS = (Platform::VCPU_VIRT_EXT_END - Platform::VCPU_VIRT_EXT_START) / L4_PAGESIZE }; - typedef Bit_allocator Vcpu_id_allocator; + using Vcpu_id_allocator = Bit_allocator; } @@ -78,8 +78,8 @@ class Core::Vm_session_component { private: - typedef Constrained_ram_allocator Con_ram_allocator; - typedef Allocator_avl_tpl Avl_region; + using Con_ram_allocator = Constrained_ram_allocator; + using Avl_region = Allocator_avl_tpl; Rpc_entrypoint &_ep; Con_ram_allocator _constrained_md_ram_alloc; diff --git a/repos/base-foc/src/include/base/internal/cap_map.h b/repos/base-foc/src/include/base/internal/cap_map.h index 8c374cec6e..0008a130ea 100644 --- a/repos/base-foc/src/include/base/internal/cap_map.h +++ b/repos/base-foc/src/include/base/internal/cap_map.h @@ -39,7 +39,7 @@ namespace Genode { - typedef Native_capability::Data Cap_index; + using Cap_index = Native_capability::Data; class Cap_index_allocator; diff --git a/repos/base-foc/src/lib/base/x86/vm.cc b/repos/base-foc/src/lib/base/x86/vm.cc index 98ac98578f..58f3d94c86 100644 --- a/repos/base-foc/src/lib/base/x86/vm.cc +++ b/repos/base-foc/src/lib/base/x86/vm.cc @@ -585,8 +585,8 @@ struct Foc_vcpu : Thread, Noncopyable using Foc::l4_vm_vmx_read_16; using Foc::l4_vm_vmx_read_32; using Foc::l4_vm_vmx_read_nat; - typedef Vcpu_state::Segment Segment; - typedef Vcpu_state::Range Range; + using Segment = Vcpu_state::Segment; + using Range = Vcpu_state::Range; { Segment cs { l4_vm_vmx_read_16(vmcs, Vmcs::CS_SEL), @@ -754,7 +754,7 @@ struct Foc_vcpu : Thread, Noncopyable vmcb_cr4_shadow = state.cr4.value(); } - typedef Vcpu_state::Segment Segment; + using Segment = Vcpu_state::Segment; state.cs.charge(Segment{vmcb->state_save_area.cs.selector, vmcb->state_save_area.cs.attrib, @@ -796,7 +796,7 @@ struct Foc_vcpu : Thread, Noncopyable vmcb->state_save_area.ldtr.limit, (addr_t)vmcb->state_save_area.ldtr.base}); - typedef Vcpu_state::Range Range; + using Range = Vcpu_state::Range; state.gdtr.charge(Range{.limit = vmcb->state_save_area.gdtr.limit, .base = (addr_t)vmcb->state_save_area.gdtr.base }); diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index baf3da3584..0d9df88996 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -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 diff --git a/repos/base-hw/src/core/kernel/signal_receiver.cc b/repos/base-hw/src/core/kernel/signal_receiver.cc index 2e192d3ffe..5c99894103 100644 --- a/repos/base-hw/src/core/kernel/signal_receiver.cc +++ b/repos/base-hw/src/core/kernel/signal_receiver.cc @@ -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(); diff --git a/repos/base-hw/src/core/kernel/signal_receiver.h b/repos/base-hw/src/core/kernel/signal_receiver.h index b583876253..f5b2df09f8 100644 --- a/repos/base-hw/src/core/kernel/signal_receiver.h +++ b/repos/base-hw/src/core/kernel/signal_receiver.h @@ -59,7 +59,7 @@ class Kernel::Signal_handler Signal_handler(Signal_handler const &); Signal_handler &operator = (Signal_handler const &); - typedef Genode::Fifo_element Fifo_element; + using Fifo_element = Genode::Fifo_element; 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 Fifo_element; + using Fifo_element = Genode::Fifo_element; 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 class Fifo : public Genode::Fifo { }; diff --git a/repos/base-hw/src/core/platform_thread.h b/repos/base-hw/src/core/platform_thread.h index 0ddc28fb1d..4c386eb1ef 100644 --- a/repos/base-hw/src/core/platform_thread.h +++ b/repos/base-hw/src/core/platform_thread.h @@ -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; diff --git a/repos/base-hw/src/core/signal_source_component.h b/repos/base-hw/src/core/signal_source_component.h index ba732dff13..82186608f3 100644 --- a/repos/base-hw/src/core/signal_source_component.h +++ b/repos/base-hw/src/core/signal_source_component.h @@ -27,8 +27,8 @@ namespace Core { class Signal_context_component; class Signal_source_component; - typedef Object_pool Signal_context_pool; - typedef Object_pool Signal_source_pool; + using Signal_context_pool = Object_pool; + using Signal_source_pool = Object_pool; } diff --git a/repos/base-hw/src/core/spec/riscv/cpu.h b/repos/base-hw/src/core/spec/riscv/cpu.h index 2d0b81d880..c4fd1353d6 100644 --- a/repos/base-hw/src/core/spec/riscv/cpu.h +++ b/repos/base-hw/src/core/spec/riscv/cpu.h @@ -44,7 +44,7 @@ namespace Core { */ class Cpu; - typedef __uint128_t sizet_arithm_t; + using sizet_arithm_t = __uint128_t; } diff --git a/repos/base-hw/src/core/spec/x86_64/virtualization/kernel/vmx.cc b/repos/base-hw/src/core/spec/x86_64/virtualization/kernel/vmx.cc index 2807f346c2..83900e6df4 100644 --- a/repos/base-hw/src/core/spec/x86_64/virtualization/kernel/vmx.cc +++ b/repos/base-hw/src/core/spec/x86_64/virtualization/kernel/vmx.cc @@ -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; diff --git a/repos/base-hw/src/core/vm_session_component.h b/repos/base-hw/src/core/vm_session_component.h index 67635df996..2eea4e9282 100644 --- a/repos/base-hw/src/core/vm_session_component.h +++ b/repos/base-hw/src/core/vm_session_component.h @@ -42,7 +42,7 @@ class Core::Vm_session_component { private: - typedef Allocator_avl_tpl Avl_region; + using Avl_region = Allocator_avl_tpl; /* * Noncopyable diff --git a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h index 354146e3e7..15aca3ebdf 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h @@ -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)); diff --git a/repos/base-linux/include/spec/arm_64/trace/timestamp.h b/repos/base-linux/include/spec/arm_64/trace/timestamp.h index 741528fb52..14a6b8a2b9 100644 --- a/repos/base-linux/include/spec/arm_64/trace/timestamp.h +++ b/repos/base-linux/include/spec/arm_64/trace/timestamp.h @@ -18,7 +18,7 @@ namespace Genode { namespace Trace { - typedef uint64_t Timestamp; + using Timestamp = uint64_t; /* * In Linux/AARCH64, the 'mrs' instruction cannot be executed in user land. diff --git a/repos/base-linux/src/include/base/internal/capability_space_tpl.h b/repos/base-linux/src/include/base/internal/capability_space_tpl.h index 52008d94b2..f085d674f0 100644 --- a/repos/base-linux/src/include/base/internal/capability_space_tpl.h +++ b/repos/base-linux/src/include/base/internal/capability_space_tpl.h @@ -81,7 +81,7 @@ class Genode::Capability_space_tpl : Noncopyable { private: - typedef CAP_DATA Data; + using Data = CAP_DATA; /** * Supplement Native_capability::Data with the meta data needed to diff --git a/repos/base-linux/src/lib/base/ipc.cc b/repos/base-linux/src/lib/base/ipc.cc index 6365642dd9..2683db3256 100644 --- a/repos/base-linux/src/lib/base/ipc.cc +++ b/repos/base-linux/src/lib/base/ipc.cc @@ -110,7 +110,7 @@ namespace { private: - typedef Genode::size_t size_t; + using size_t = Genode::size_t; msghdr _msg { }; iovec _iovec { }; diff --git a/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc b/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc index 6778366bee..9bb2af2684 100644 --- a/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc +++ b/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc @@ -427,7 +427,7 @@ namespace { struct Global_allocator : Allocator { - typedef Genode::size_t size_t; + using size_t = Genode::size_t; Alloc_result try_alloc(size_t size) override { return malloc(size); } diff --git a/repos/base-nova/include/nova/capability_space.h b/repos/base-nova/include/nova/capability_space.h index 5d351a6eea..c85542ff3d 100644 --- a/repos/base-nova/include/nova/capability_space.h +++ b/repos/base-nova/include/nova/capability_space.h @@ -24,7 +24,7 @@ namespace Genode { namespace Capability_space { static constexpr unsigned long INVALID_INDEX = ~0UL; - typedef Nova::Crd Ipc_cap_data; + using Ipc_cap_data = Nova::Crd; static inline Nova::Crd crd(Native_capability const &cap) { diff --git a/repos/base-nova/src/core/include/nova_util.h b/repos/base-nova/src/core/include/nova_util.h index 2736c5466c..f27fb32a05 100644 --- a/repos/base-nova/src/core/include/nova_util.h +++ b/repos/base-nova/src/core/include/nova_util.h @@ -70,7 +70,7 @@ static int map_local(Genode::addr_t const pd, Nova::Utcb &utcb, Nova::uint8_t res = Nova::delegate(pd, pd, dst_crd); if (res != Nova::NOVA_OK) { - typedef Genode::Hex Hex; + using Hex = Genode::Hex; error("map_local failed ", Hex(src_crd.addr()), ":", Hex(src_crd.order()), ":", Hex(src_crd.type()), "->", Hex(dst_crd.addr()), ":", Hex(dst_crd.order()), ":", Hex(dst_crd.type()), " - ", diff --git a/repos/base-nova/src/core/include/vm_session_component.h b/repos/base-nova/src/core/include/vm_session_component.h index 8ebc38b993..e86e6636b7 100644 --- a/repos/base-nova/src/core/include/vm_session_component.h +++ b/repos/base-nova/src/core/include/vm_session_component.h @@ -37,8 +37,8 @@ class Core::Vm_session_component { private: - typedef Constrained_ram_allocator Con_ram_allocator; - typedef Allocator_avl_tpl Avl_region; + using Con_ram_allocator = Constrained_ram_allocator; + using Avl_region = Allocator_avl_tpl; class Vcpu : public Rpc_object, public Trace::Source::Info_accessor diff --git a/repos/base-nova/src/lib/base/rpc_entrypoint.cc b/repos/base-nova/src/lib/base/rpc_entrypoint.cc index e2cc98ef21..eea468eac2 100644 --- a/repos/base-nova/src/lib/base/rpc_entrypoint.cc +++ b/repos/base-nova/src/lib/base/rpc_entrypoint.cc @@ -229,7 +229,7 @@ Rpc_entrypoint::Rpc_entrypoint(Pd_session *pd_session, size_t stack_size, Rpc_entrypoint::~Rpc_entrypoint() { - typedef Object_pool Pool; + using Pool = Object_pool; Pool::remove_all([&] (Rpc_object_base *obj) { warning("object pool not empty in ", __func__); diff --git a/repos/base-nova/src/lib/base/vm.cc b/repos/base-nova/src/lib/base/vm.cc index 96171cc3bd..3d0639ef7e 100644 --- a/repos/base-nova/src/lib/base/vm.cc +++ b/repos/base-nova/src/lib/base/vm.cc @@ -48,7 +48,7 @@ struct Nova_vcpu : Rpc_client, Noncopyable enum { VM_EXIT_STARTUP = 0xfe, VM_EXIT_RECALL = 0xff }; - typedef Id_space Vcpu_space; + using Vcpu_space = Id_space; static Vcpu_space &_vcpu_space() { @@ -168,8 +168,8 @@ struct Nova_vcpu : Rpc_client, Noncopyable void Nova_vcpu::_read_nova_state(Nova::Utcb &utcb) { - typedef Genode::Vcpu_state::Segment Segment; - typedef Genode::Vcpu_state::Range Range; + using Segment = Genode::Vcpu_state::Segment; + using Range = Genode::Vcpu_state::Range; _vcpu_state.discharge(); _vcpu_state.exit_reason = static_cast(utcb.exit_reason); diff --git a/repos/base-nova/src/test/nova/server.h b/repos/base-nova/src/test/nova/server.h index cf0651e88f..e17c29a932 100644 --- a/repos/base-nova/src/test/nova/server.h +++ b/repos/base-nova/src/test/nova/server.h @@ -74,7 +74,7 @@ struct Test::Component : Genode::Rpc_object Genode::Native_capability cap_cap(Genode::addr_t); }; -namespace Test { typedef Genode::Capability Capability; } +namespace Test { using Capability = Genode::Capability; } /** * Session implementation diff --git a/repos/base-okl4/src/include/base/internal/rpc_destination.h b/repos/base-okl4/src/include/base/internal/rpc_destination.h index 0aeb69e125..69947de0fe 100644 --- a/repos/base-okl4/src/include/base/internal/rpc_destination.h +++ b/repos/base-okl4/src/include/base/internal/rpc_destination.h @@ -19,7 +19,7 @@ namespace Genode { - typedef Okl4::L4_ThreadId_t Rpc_destination; + using Rpc_destination = Okl4::L4_ThreadId_t; static inline Rpc_destination invalid_rpc_destination() { diff --git a/repos/base-pistachio/src/core/include/platform.h b/repos/base-pistachio/src/core/include/platform.h index 5f096b2d86..8febf8ccee 100644 --- a/repos/base-pistachio/src/core/include/platform.h +++ b/repos/base-pistachio/src/core/include/platform.h @@ -37,7 +37,7 @@ class Core::Platform : public Platform_generic /* * Shortcut for the type of allocator instances for physical resources */ - typedef Synced_range_allocator Phys_allocator; + using Phys_allocator = Synced_range_allocator; Phys_allocator _ram_alloc; /* RAM allocator */ Phys_allocator _io_mem_alloc; /* MMIO allocator */ diff --git a/repos/base-pistachio/src/core/include/platform_thread.h b/repos/base-pistachio/src/core/include/platform_thread.h index f16aa137b0..98f241d177 100644 --- a/repos/base-pistachio/src/core/include/platform_thread.h +++ b/repos/base-pistachio/src/core/include/platform_thread.h @@ -48,7 +48,7 @@ class Core::Platform_thread : Interface { private: - typedef Pistachio::L4_ThreadId_t L4_ThreadId_t; + using L4_ThreadId_t = Pistachio::L4_ThreadId_t; /* * Noncopyable diff --git a/repos/base-pistachio/src/include/base/internal/rpc_destination.h b/repos/base-pistachio/src/include/base/internal/rpc_destination.h index 2e0f643bc0..684f05ac51 100644 --- a/repos/base-pistachio/src/include/base/internal/rpc_destination.h +++ b/repos/base-pistachio/src/include/base/internal/rpc_destination.h @@ -18,7 +18,7 @@ namespace Genode { - typedef Pistachio::L4_ThreadId_t Rpc_destination; + using Rpc_destination = Pistachio::L4_ThreadId_t; static inline Rpc_destination invalid_rpc_destination() { diff --git a/repos/base-sel4/src/core/include/cnode.h b/repos/base-sel4/src/core/include/cnode.h index 31be281a87..70d97c7a26 100644 --- a/repos/base-sel4/src/core/include/cnode.h +++ b/repos/base-sel4/src/core/include/cnode.h @@ -37,7 +37,7 @@ class Core::Cnode_base public: - typedef Cnode_index Index; + using Index = Cnode_index; Cap_sel sel() const { return _sel; } uint8_t size_log2() const { return _size_log2; } diff --git a/repos/base-sel4/src/core/include/platform.h b/repos/base-sel4/src/core/include/platform.h index 4d8c8e2511..e91cf3f438 100644 --- a/repos/base-sel4/src/core/include/platform.h +++ b/repos/base-sel4/src/core/include/platform.h @@ -158,7 +158,7 @@ class Core::Platform : public Platform_generic * XXX Consider making Bit_allocator::_reserve public so that we can * turn the bit allocator into a private member of 'Core_sel_alloc'. */ - typedef Bit_allocator<1 << Core_cspace::NUM_CORE_SEL_LOG2> Core_sel_bit_alloc; + using Core_sel_bit_alloc = Bit_allocator<1 << Core_cspace::NUM_CORE_SEL_LOG2>; struct Core_sel_alloc : Cap_sel_alloc, private Core_sel_bit_alloc { diff --git a/repos/base-sel4/src/core/include/vm_session_component.h b/repos/base-sel4/src/core/include/vm_session_component.h index 3e7349093d..094da243cf 100644 --- a/repos/base-sel4/src/core/include/vm_session_component.h +++ b/repos/base-sel4/src/core/include/vm_session_component.h @@ -61,7 +61,7 @@ class Core::Vm_session_component Capability state() const { return _ds_cap; } }; - typedef Allocator_avl_tpl Avl_region; + using Avl_region = Allocator_avl_tpl; Rpc_entrypoint &_ep; Constrained_ram_allocator _constrained_md_ram_alloc; diff --git a/repos/base-sel4/src/core/platform.cc b/repos/base-sel4/src/core/platform.cc index f6da6d8b24..25b68940cb 100644 --- a/repos/base-sel4/src/core/platform.cc +++ b/repos/base-sel4/src/core/platform.cc @@ -152,7 +152,7 @@ void Core::Platform::_init_allocators() stack_area_virtual_size()); if (verbose_boot_info) { - typedef Hex_range Hex_range; + using Hex_range = Hex_range; log("virtual address layout of core:"); log(" overall ", Hex_range(_vm_base, _vm_size)); log(" core image ", Hex_range(core_virt_beg, image_elf_size)); diff --git a/repos/base-sel4/src/include/base/internal/capability_space_sel4.h b/repos/base-sel4/src/include/base/internal/capability_space_sel4.h index c4c91bccb6..4d6320340a 100644 --- a/repos/base-sel4/src/include/base/internal/capability_space_sel4.h +++ b/repos/base-sel4/src/include/base/internal/capability_space_sel4.h @@ -139,7 +139,7 @@ class Genode::Capability_space_sel4 private: - typedef CAP_DATA Data; + using Data = CAP_DATA; /** * Supplement Native_capability::Data with the meta data needed to diff --git a/repos/base-sel4/src/lib/base/x86/vm.cc b/repos/base-sel4/src/lib/base/x86/vm.cc index 908f96419f..e263ef9b9a 100644 --- a/repos/base-sel4/src/lib/base/x86/vm.cc +++ b/repos/base-sel4/src/lib/base/x86/vm.cc @@ -676,8 +676,8 @@ struct Sel4_vcpu : Genode::Thread, Noncopyable _write_vmcs(service, Vmcs::CR4_SHADOW, state.cr4.value()); } - typedef Genode::Vcpu_state::Segment Segment; - typedef Genode::Vcpu_state::Range Range; + using Segment = Genode::Vcpu_state::Segment; + using Range = Genode::Vcpu_state::Range; state.cs.charge(Segment{_read_vmcs_16(service, Vmcs::CS_SEL), _convert_ar_16(_read_vmcs(service, Vmcs::CS_AR)), diff --git a/repos/base/include/base/allocator_avl.h b/repos/base/include/base/allocator_avl.h index cead57ce4a..60524803bb 100644 --- a/repos/base/include/base/allocator_avl.h +++ b/repos/base/include/base/allocator_avl.h @@ -39,7 +39,7 @@ namespace Genode { * Define AVL-based allocator without any meta data attached to each block */ class Empty { }; - typedef Allocator_avl_tpl Allocator_avl; + using Allocator_avl = Allocator_avl_tpl; } diff --git a/repos/base/include/base/capability.h b/repos/base/include/base/capability.h index 8f28375061..ef2992bd00 100644 --- a/repos/base/include/base/capability.h +++ b/repos/base/include/base/capability.h @@ -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 class Capability; @@ -123,7 +123,7 @@ class Genode::Capability : public Untyped_capability template struct Arg { - typedef typename Meta::Type_at::Type Type; + using Type = typename Meta::Type_at::Type; }; template @@ -138,7 +138,7 @@ class Genode::Capability : public Untyped_capability public: - typedef RPC_INTERFACE Rpc_interface; + using Rpc_interface = RPC_INTERFACE; /** * Constructor diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h index 430f0b89fe..8a99561f05 100644 --- a/repos/base/include/base/child.h +++ b/repos/base/include/base/child.h @@ -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, 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, 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, Id_space::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, "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(); } diff --git a/repos/base/include/base/ipc_msgbuf.h b/repos/base/include/base/ipc_msgbuf.h index 6b636824f3..d68623e5ab 100644 --- a/repos/base/include/base/ipc_msgbuf.h +++ b/repos/base/include/base/ipc_msgbuf.h @@ -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 diff --git a/repos/base/include/base/local_connection.h b/repos/base/include/base/local_connection.h index 56c1d2e721..dbacb8bca9 100644 --- a/repos/base/include/base/local_connection.h +++ b/repos/base/include/base/local_connection.h @@ -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 _client { }; diff --git a/repos/base/include/base/log.h b/repos/base/include/base/log.h index be8e05a9bf..fb02268d0a 100644 --- a/repos/base/include/base/log.h +++ b/repos/base/include/base/log.h @@ -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 - Buffered_trace_output; + using Buffered_trace_output = + Buffered_output; public: @@ -210,7 +209,7 @@ class Genode::Log_tsc_probe : Noncopyable { private: - typedef Trace::Timestamp Timestamp; + using Timestamp = Trace::Timestamp; struct Pretty_tsc { diff --git a/repos/base/include/base/quota_guard.h b/repos/base/include/base/quota_guard.h index 86068c83cd..394bc6c7f1 100644 --- a/repos/base/include/base/quota_guard.h +++ b/repos/base/include/base/quota_guard.h @@ -289,11 +289,11 @@ class Genode::Quota_guard namespace Genode { - typedef Quota_guard Ram_quota_guard; - typedef Quota_guard Cap_quota_guard; + using Ram_quota_guard = Quota_guard; + using Cap_quota_guard = Quota_guard; - 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_ */ diff --git a/repos/base/include/base/ram_allocator.h b/repos/base/include/base/ram_allocator.h index 46225e4592..a11d3f6a4d 100644 --- a/repos/base/include/base/ram_allocator.h +++ b/repos/base/include/base/ram_allocator.h @@ -24,7 +24,7 @@ namespace Genode { struct Ram_dataspace : Dataspace { }; - typedef Capability Ram_dataspace_capability; + using Ram_dataspace_capability = Capability; struct Ram_allocator; diff --git a/repos/base/include/base/rpc.h b/repos/base/include/base/rpc.h index 889f712144..5462573bd9 100644 --- a/repos/base/include/base/rpc.h +++ b/repos/base/include/base/rpc.h @@ -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::Type Exceptions; \ - typedef ::Genode::Trait::Call_return::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::Type; \ + using Ret_type = ::Genode::Trait::Call_return::Type; \ \ template \ 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::Type \ - Rpc_functions; \ - typedef base Rpc_inherited_interface; + using Rpc_functions = ::Genode::Meta::Append::Type; \ + using Rpc_inherited_interface = base; namespace Genode { @@ -101,11 +100,11 @@ namespace Genode { template struct Rpc_direction; - template struct Rpc_direction { typedef Rpc_arg_in Type; }; - template struct Rpc_direction { typedef Rpc_arg_in Type; }; - template struct Rpc_direction { typedef Rpc_arg_in Type; }; - template struct Rpc_direction { typedef Rpc_arg_inout Type; }; - template struct Rpc_direction { typedef Rpc_arg_inout Type; }; + template struct Rpc_direction { using Type = Rpc_arg_in; }; + template struct Rpc_direction { using Type = Rpc_arg_in; }; + template struct Rpc_direction { using Type = Rpc_arg_in; }; + template struct Rpc_direction { using Type = Rpc_arg_inout; }; + template struct Rpc_direction { 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 struct Call_return { typedef T Type; }; - template <> struct Call_return { typedef Meta::Empty Type; }; + template struct Call_return { using Type = T; }; + template <> struct Call_return { 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 struct Exc_list { typedef T Type; }; - template <> struct Exc_list > { typedef Meta::Empty Type; }; + template struct Exc_list { using Type = T; }; + template <> struct Exc_list > { using Type = Meta::Empty; }; } @@ -202,7 +201,7 @@ namespace Genode { */ template struct Rpc_args_size { - typedef typename ARGS::Head This; + using This = typename ARGS::Head; enum { This_size = Rpc_transfer_size::Value }; enum { Value = (IN && Trait::Rpc_direction::Type::IN ? This_size : 0) + (OUT && Trait::Rpc_direction::Type::OUT ? This_size : 0) @@ -235,7 +234,7 @@ namespace Genode { */ template struct Rpc_msg_payload_size { - typedef typename RPC_FUNCTION::Server_args Args; + using Args = typename RPC_FUNCTION::Server_args; enum { Value = Rpc_args_size::Value }; }; @@ -305,7 +304,7 @@ namespace Genode { */ template 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::Value }; }; @@ -315,8 +314,8 @@ namespace Genode { template struct Rpc_interface_is_inherited { - typedef char yes[1]; - typedef char no[2]; + using yes = char[1]; + using no = char[2]; template static yes &test(typename IF::Rpc_inherited_interface *); diff --git a/repos/base/include/base/rpc_client.h b/repos/base/include/base/rpc_client.h index bd4319b6bf..ae4129aa47 100644 --- a/repos/base/include/base/rpc_client.h +++ b/repos/base/include/base/rpc_client.h @@ -109,7 +109,7 @@ namespace Genode { * '_unmarshal_result' is selected depending on the RPC * direction. */ - typedef typename Trait::Rpc_direction::Type Rpc_dir; + using Rpc_dir = typename Trait::Rpc_direction::Type; _unmarshal_result(unmarshaller, args.get(), Meta::Overload_selector()); /* unmarshal remaining arguments */ @@ -137,7 +137,7 @@ namespace Genode { Msgbuf 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(Meta::Index_of::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 const &cap) : _cap(cap) { } diff --git a/repos/base/include/base/rpc_server.h b/repos/base/include/base/rpc_server.h index 605c6b35e2..52c9203f00 100644 --- a/repos/base/include/base/rpc_server.h +++ b/repos/base/include/base/rpc_server.h @@ -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) { typename Trait::Rpc_direction::Type direction; - typedef typename ARG_LIST::Stored_head Arg; + using Arg = typename ARG_LIST::Stored_head; Arg arg = _read_arg(msg, direction); Meta::Overload_selector tail_selector; @@ -124,7 +124,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE EXCEPTION_CODE = Rpc_exception_code::EXCEPTION_BASE - Meta::Length::Value; try { - typedef typename EXC_TL::Tail Exc_tail; + using Exc_tail = typename EXC_TL::Tail; return _do_serve(args, Meta::Overload_selector()); } 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) { - typedef typename RPC_FUNCTION::Ret_type Ret_type; + using Ret_type = typename RPC_FUNCTION::Ret_type; SERVER *me = static_cast(this); return RPC_FUNCTION::template serve(*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::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 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 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()); } diff --git a/repos/base/include/base/service.h b/repos/base/include/base/service.h index 77856fb289..93275a6c51 100644 --- a/repos/base/include/base/service.h +++ b/repos/base/include/base/service.h @@ -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; diff --git a/repos/base/include/base/session_object.h b/repos/base/include/base/session_object.h index 38ea670475..78f0e15181 100644 --- a/repos/base/include/base/session_object.h +++ b/repos/base/include/base/session_object.h @@ -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; diff --git a/repos/base/include/base/session_state.h b/repos/base/include/base/session_state.h index b7194f32b9..bc3289fb0c 100644 --- a/repos/base/include/base/session_state.h +++ b/repos/base/include/base/session_state.h @@ -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 { diff --git a/repos/base/include/base/shared_object.h b/repos/base/include/base/shared_object.h index f4dd1622fe..a8df46220a 100644 --- a/repos/base/include/base/shared_object.h +++ b/repos/base/include/base/shared_object.h @@ -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 diff --git a/repos/base/include/base/signal.h b/repos/base/include/base/signal.h index 427a3731e5..f91d195b75 100644 --- a/repos/base/include/base/signal.h +++ b/repos/base/include/base/signal.h @@ -43,7 +43,7 @@ namespace Genode { template class Signal_handler; template class Io_signal_handler; - typedef Capability Signal_context_capability; + using Signal_context_capability = Capability; } diff --git a/repos/base/include/base/thread.h b/repos/base/include/base/thread.h index 567500e11b..af3c86d929 100644 --- a/repos/base/include/base/thread.h +++ b/repos/base/include/base/thread.h @@ -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; }; diff --git a/repos/base/include/cpu/string.h b/repos/base/include/cpu/string.h index c429da2842..898b0a9b57 100644 --- a/repos/base/include/cpu/string.h +++ b/repos/base/include/cpu/string.h @@ -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), diff --git a/repos/base/include/cpu_session/capability.h b/repos/base/include/cpu_session/capability.h index 15c9e303df..970ed82f0e 100644 --- a/repos/base/include/cpu_session/capability.h +++ b/repos/base/include/cpu_session/capability.h @@ -19,7 +19,7 @@ namespace Genode { class Cpu_session; - typedef Capability Cpu_session_capability; + using Cpu_session_capability = Capability; } #endif /* _INCLUDE__CPU_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/dataspace/capability.h b/repos/base/include/dataspace/capability.h index 7aa33d495a..40b87dea77 100644 --- a/repos/base/include/dataspace/capability.h +++ b/repos/base/include/dataspace/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Dataspace_capability; } +namespace Genode { using Dataspace_capability = Capability; } #endif /* _INCLUDE__DATASPACE__CAPABILITY_H_ */ diff --git a/repos/base/include/io_mem_session/capability.h b/repos/base/include/io_mem_session/capability.h index 42ebcdd316..abe800a88f 100644 --- a/repos/base/include/io_mem_session/capability.h +++ b/repos/base/include/io_mem_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Io_mem_session_capability; } +namespace Genode { using Io_mem_session_capability = Capability; } #endif /* _INCLUDE__IO_MEM_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/io_mem_session/io_mem_session.h b/repos/base/include/io_mem_session/io_mem_session.h index 38530ca232..0cfabfad2a 100644 --- a/repos/base/include/io_mem_session/io_mem_session.h +++ b/repos/base/include/io_mem_session/io_mem_session.h @@ -22,7 +22,7 @@ namespace Genode { struct Io_mem_dataspace; struct Io_mem_session; - typedef Capability Io_mem_dataspace_capability; + using Io_mem_dataspace_capability = Capability; } diff --git a/repos/base/include/io_port_session/capability.h b/repos/base/include/io_port_session/capability.h index 8c22b2c0c3..6e853da227 100644 --- a/repos/base/include/io_port_session/capability.h +++ b/repos/base/include/io_port_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Io_port_session_capability; } +namespace Genode { using Io_port_session_capability = Capability; } #endif /* _INCLUDE__IO_PORT_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/irq_session/capability.h b/repos/base/include/irq_session/capability.h index ddcec12801..a266c75cf8 100644 --- a/repos/base/include/irq_session/capability.h +++ b/repos/base/include/irq_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Irq_session_capability; } +namespace Genode { using Irq_session_capability = Capability; } #endif /* _INCLUDE__IRQ_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/log_session/capability.h b/repos/base/include/log_session/capability.h index c1949271ca..ace17b65d1 100644 --- a/repos/base/include/log_session/capability.h +++ b/repos/base/include/log_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Log_session_capability; } +namespace Genode { using Log_session_capability = Capability; } #endif /* _INCLUDE__LOG_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/log_session/log_session.h b/repos/base/include/log_session/log_session.h index 4fa773ed52..fcf3492ef4 100644 --- a/repos/base/include/log_session/log_session.h +++ b/repos/base/include/log_session/log_session.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 String; + using String = Rpc_in_buffer; /** * Output null-terminated string diff --git a/repos/base/include/parent/capability.h b/repos/base/include/parent/capability.h index 21928f5782..6aab744b66 100644 --- a/repos/base/include/parent/capability.h +++ b/repos/base/include/parent/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Parent_capability; } +namespace Genode { using Parent_capability = Capability; } #endif /* _INCLUDE__PARENT__CAPABILITY_H_ */ diff --git a/repos/base/include/parent/parent.h b/repos/base/include/parent/parent.h index 7379342e5b..c2e885e4f2 100644 --- a/repos/base/include/parent/parent.h +++ b/repos/base/include/parent/parent.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::Id Id; }; - struct Server : Interface { typedef Id_space::Id Id; }; + struct Client : Interface { using Id = Id_space::Id; }; + struct Server : Interface { using Id = Id_space::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 void announce(Capability 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 const &service Genode::Meta::Bool_to_type *) { /* 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 Root_inherited; + using Root_inherited = Typed_root; /* convert root capability to match the inherited session type */ Capability root = service_root; diff --git a/repos/base/include/pd_session/capability.h b/repos/base/include/pd_session/capability.h index 59b3a89eb5..a0789d047f 100644 --- a/repos/base/include/pd_session/capability.h +++ b/repos/base/include/pd_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Pd_session_capability; } +namespace Genode { using Pd_session_capability = Capability; } #endif /* _INCLUDE__PD_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/pd_session/pd_session.h b/repos/base/include/pd_session/pd_session.h index 0e2072feaa..c487129690 100644 --- a/repos/base/include/pd_session/pd_session.h +++ b/repos/base/include/pd_session/pd_session.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() { } diff --git a/repos/base/include/rm_session/capability.h b/repos/base/include/rm_session/capability.h index 0a11286426..d2bfa9c257 100644 --- a/repos/base/include/rm_session/capability.h +++ b/repos/base/include/rm_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Rm_session_capability; } +namespace Genode { using Rm_session_capability = Capability; } #endif /* _INCLUDE__RM_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/rom_session/capability.h b/repos/base/include/rom_session/capability.h index 2a9b1c04f3..f35b00d6de 100644 --- a/repos/base/include/rom_session/capability.h +++ b/repos/base/include/rom_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Rom_session_capability; } +namespace Genode { using Rom_session_capability = Capability; } #endif /* _INCLUDE__ROM_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/rom_session/rom_session.h b/repos/base/include/rom_session/rom_session.h index f3db7c693e..90eb2c56b6 100644 --- a/repos/base/include/rom_session/rom_session.h +++ b/repos/base/include/rom_session/rom_session.h @@ -27,7 +27,7 @@ namespace Genode { struct Rom_session; struct Rom_session_client; - typedef Capability Rom_dataspace_capability; + using Rom_dataspace_capability = Capability; } @@ -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() { } diff --git a/repos/base/include/root/capability.h b/repos/base/include/root/capability.h index 42bbb199dc..195dc7c406 100644 --- a/repos/base/include/root/capability.h +++ b/repos/base/include/root/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Root_capability; } +namespace Genode { using Root_capability = Capability; } #endif /* _INCLUDE__ROOT__CAPABILITY_H_ */ diff --git a/repos/base/include/root/root.h b/repos/base/include/root/root.h index c7e3a0c908..47b5e04867 100644 --- a/repos/base/include/root/root.h +++ b/repos/base/include/root/root.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 struct Genode::Typed_root : Root { - typedef SESSION_TYPE Session_type; + using Session_type = SESSION_TYPE; }; #endif /* _INCLUDE__ROOT__ROOT_H_ */ diff --git a/repos/base/include/session/capability.h b/repos/base/include/session/capability.h index a69d734c31..055ab9d5fa 100644 --- a/repos/base/include/session/capability.h +++ b/repos/base/include/session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Genode { typedef Capability Session_capability; } +namespace Genode { using Session_capability = Capability; } #endif /* _INCLUDE__SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/session/session.h b/repos/base/include/session/session.h index 2ef1b6104a..7a4eec48fa 100644 --- a/repos/base/include/session/session.h +++ b/repos/base/include/session/session.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' diff --git a/repos/base/include/spec/arm_64/trace/timestamp.h b/repos/base/include/spec/arm_64/trace/timestamp.h index 077effd4dd..f07c07a173 100644 --- a/repos/base/include/spec/arm_64/trace/timestamp.h +++ b/repos/base/include/spec/arm_64/trace/timestamp.h @@ -19,7 +19,7 @@ namespace Genode { namespace Trace { - typedef uint64_t Timestamp; + using Timestamp = uint64_t; inline Timestamp timestamp() { diff --git a/repos/base/include/spec/arm_v6/trace/timestamp.h b/repos/base/include/spec/arm_v6/trace/timestamp.h index 4b49e9c277..308eb74541 100644 --- a/repos/base/include/spec/arm_v6/trace/timestamp.h +++ b/repos/base/include/spec/arm_v6/trace/timestamp.h @@ -20,7 +20,7 @@ namespace Genode { namespace Trace { - typedef uint32_t Timestamp; + using Timestamp = uint32_t; inline Timestamp timestamp() { diff --git a/repos/base/include/spec/arm_v7/trace/timestamp.h b/repos/base/include/spec/arm_v7/trace/timestamp.h index df4e53e038..e53976fc99 100644 --- a/repos/base/include/spec/arm_v7/trace/timestamp.h +++ b/repos/base/include/spec/arm_v7/trace/timestamp.h @@ -20,7 +20,7 @@ namespace Genode { namespace Trace { - typedef uint32_t Timestamp; + using Timestamp = uint32_t; inline Timestamp timestamp() { diff --git a/repos/base/include/spec/riscv/trace/timestamp.h b/repos/base/include/spec/riscv/trace/timestamp.h index 7da737d8f4..ac045b0704 100644 --- a/repos/base/include/spec/riscv/trace/timestamp.h +++ b/repos/base/include/spec/riscv/trace/timestamp.h @@ -20,7 +20,7 @@ namespace Genode { namespace Trace { - typedef uint32_t Timestamp; + using Timestamp = uint32_t; inline Timestamp timestamp() { diff --git a/repos/base/include/spec/x86_32/trace/timestamp.h b/repos/base/include/spec/x86_32/trace/timestamp.h index 9a73140dad..2a397cd3e5 100644 --- a/repos/base/include/spec/x86_32/trace/timestamp.h +++ b/repos/base/include/spec/x86_32/trace/timestamp.h @@ -20,7 +20,7 @@ namespace Genode { namespace Trace { - typedef uint64_t Timestamp; + using Timestamp = uint64_t; inline Timestamp timestamp() { diff --git a/repos/base/include/spec/x86_64/trace/timestamp.h b/repos/base/include/spec/x86_64/trace/timestamp.h index a432dabb87..643cecf7a5 100644 --- a/repos/base/include/spec/x86_64/trace/timestamp.h +++ b/repos/base/include/spec/x86_64/trace/timestamp.h @@ -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() diff --git a/repos/base/include/timer_session/capability.h b/repos/base/include/timer_session/capability.h index 257d4b99d4..96e6cd06e6 100644 --- a/repos/base/include/timer_session/capability.h +++ b/repos/base/include/timer_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Timer { typedef Genode::Capability Session_capability; } +namespace Timer { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__TIMER_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/timer_session/timer_session.h b/repos/base/include/timer_session/timer_session.h index f552a39ac9..1400bed8be 100644 --- a/repos/base/include/timer_session/timer_session.h +++ b/repos/base/include/timer_session/timer_session.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 diff --git a/repos/base/include/util/arg_string.h b/repos/base/include/util/arg_string.h index 1522638bb2..8c5fbaeaa4 100644 --- a/repos/base/include/util/arg_string.h +++ b/repos/base/include/util/arg_string.h @@ -44,7 +44,7 @@ class Genode::Arg * * Argument-string tokens accept C-style identifiers. */ - typedef ::Genode::Token Token; + using Token = ::Genode::Token; friend class Arg_string; @@ -202,7 +202,7 @@ class Genode::Arg class Genode::Arg_string { - typedef Arg::Token Token; + using Token = Arg::Token; private: diff --git a/repos/base/include/util/avl_tree.h b/repos/base/include/util/avl_tree.h index 9172449d27..5edf688b6b 100644 --- a/repos/base/include/util/avl_tree.h +++ b/repos/base/include/util/avl_tree.h @@ -67,7 +67,7 @@ class Genode::Avl_node_base : Noncopyable public: - typedef bool Side; + using Side = bool; enum { LEFT = false, RIGHT = true }; diff --git a/repos/base/include/util/meta.h b/repos/base/include/util/meta.h index 7faee55786..5faebaa1c5 100644 --- a/repos/base/include/util/meta.h +++ b/repos/base/include/util/meta.h @@ -22,22 +22,22 @@ namespace Genode { ** Reference and non-reference types ** ***************************************/ - template struct Reference { typedef T& Type; }; - template struct Reference { typedef T* Type; }; - template struct Reference { typedef T& Type; }; + template struct Reference { using Type = T&; }; + template struct Reference { using Type = T*; }; + template struct Reference { using Type = T&; }; - template struct Non_reference { typedef T Type; }; - template struct Non_reference { typedef T Type; }; - template struct Non_reference { typedef T Type; }; + template struct Non_reference { using Type = T; }; + template struct Non_reference { using Type = T; }; + template struct Non_reference { using Type = T; }; - template struct Non_const { typedef T Type; }; - template struct Non_const { typedef T Type; }; + template struct Non_const { using Type = T; }; + template struct Non_const { using Type = T; }; /** * Determine plain-old-data type corresponding to type 'T' */ template struct Pod { - typedef typename Non_const::Type>::Type Type; }; + using Type = typename Non_const::Type>::Type; }; } /* namespace Trait */ @@ -80,8 +80,8 @@ namespace Genode { template 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 struct Type_list : Type_tuple { }; @@ -136,18 +136,18 @@ namespace Genode { class Append { /* pass appendix towards the end of the typelist */ - typedef typename Append::Type _Tail; + using _Tail = typename Append::Type; public: /* keep head, replace tail */ - typedef Type_tuple Type; + using Type = Type_tuple; }; /* replace end of type list ('Empty' type) with appendix */ template - struct Append { typedef APPENDIX Type; }; + struct Append { using Type = APPENDIX; }; /** @@ -155,17 +155,17 @@ namespace Genode { */ template struct Type_at { - typedef typename Type_at::Type Type; }; + using Type = typename Type_at::Type; }; /* end recursion if we reached the type */ template - struct Type_at { typedef typename TL::Head Type; }; + struct Type_at { using Type = typename TL::Head; }; /* end recursion at the end of type list */ - template struct Type_at { typedef void Type; }; + template struct Type_at { using Type = void; }; /* resolve ambiguous specializations */ - template <> struct Type_at { typedef void Type; }; + template <> struct Type_at { using Type = void; }; /** @@ -300,12 +300,12 @@ namespace Genode { template struct Pod_tuple { - typedef typename Trait::Pod::Type Stored_head; + using Stored_head = typename Trait::Pod::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 struct Pod_tuple { - typedef typename Trait::Non_reference::Type Stored_head; + using Stored_head = typename Trait::Non_reference::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 { - typedef Empty Type; }; + using Type = Empty; }; template struct Ref_args { - typedef Ref_tuple Type; }; + using Type = Ref_tuple; }; template struct Ref_args { - typedef Ref_tuple_3 Type; }; + using Type = Ref_tuple_3; }; template struct Ref_args { - typedef Ref_tuple_4 Type; }; + using Type = Ref_tuple_4; }; template struct Ref_args { - typedef Ref_tuple_5 Type; }; + using Type = Ref_tuple_5; }; template struct Ref_args { - typedef Ref_tuple_6 Type; }; + using Type = Ref_tuple_6; }; template struct Ref_args { - typedef Ref_tuple_7 Type; }; + using Type = Ref_tuple_7; }; template struct Ref_args { - typedef Ref_tuple_8 Type; }; + using Type = Ref_tuple_8; }; /** @@ -398,28 +398,28 @@ namespace Genode { struct Pod_args; template <> - struct Pod_args { typedef Empty Type; }; + struct Pod_args { using Type = Empty; }; template - struct Pod_args { typedef Pod_tuple Type; }; + struct Pod_args { using Type = Pod_tuple; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::Type>; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::Type>; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::Type>; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::Type>; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::Type>; }; template - struct Pod_args { typedef Pod_tuple::Type> Type; }; + struct Pod_args { using Type = Pod_tuple::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() { } diff --git a/repos/base/include/util/register.h b/repos/base/include/util/register.h index 7abffc1862..932009822a 100644 --- a/repos/base/include/util/register.h +++ b/repos/base/include/util/register.h @@ -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::WIDTH_LOG2; static constexpr size_t BITFIELD_WIDTH = ACCESS_WIDTH; - typedef typename Trait::Uint_width::Type access_t; + using access_t = typename Trait::Uint_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::WIDTH>::Type - bitfield_t; + using bitfield_t = + typename Trait::Uint_width::WIDTH>::Type; /** * Get an unshifted mask of this field @@ -163,7 +162,7 @@ struct Genode::Register /** * Back reference to containing register */ - typedef Register Compound_reg; + using Compound_reg = Register; /** * Get register with this bitfield set to 'value' and rest left 0 @@ -217,16 +216,16 @@ struct Genode::Register template 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; - typedef typename Trait::Uint_width::Type access_t; - typedef Bitset_2 Bitset_2_base; + using access_t = typename Trait::Uint_width::Type; + using Bitset_2_base = Bitset_2; /** * Convert bitset value to register representation @@ -284,10 +283,10 @@ struct Genode::Bitset_2 template struct Genode::Bitset_3 { - typedef _BITS_0 Bits_0; - typedef _BITS_1 Bits_1; - typedef _BITS_2 Bits_2; - typedef Bitset_2 Bits_0_1; + using Bits_0 = _BITS_0; + using Bits_1 = _BITS_1; + using Bits_2 = _BITS_2; + using Bits_0_1 = Bitset_2; 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; - typedef typename Trait::Uint_width::Type access_t; - typedef Bitset_3 Bitset_3_base; + using access_t = typename Trait::Uint_width::Type; + using Bitset_3_base = Bitset_3; /** * Convert bitset value to register representation diff --git a/repos/base/include/util/register_set.h b/repos/base/include/util/register_set.h index 10a58be0d3..aaca5c46a8 100644 --- a/repos/base/include/util/register_set.h +++ b/repos/base/include/util/register_set.h @@ -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 > { /* 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 - Register_array_base; + using Register_array_base = Register_array; - typedef typename Register:: - access_t access_t; + using access_t = + typename Register:: 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 - Compound_array; + using Compound_array = Register_array; }; @@ -406,8 +399,8 @@ class Genode::Register_set : public Register_set_base template 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(_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(_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(_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(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 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(); access_t const v1 = read(); @@ -634,8 +627,8 @@ class Genode::Register_set : public Register_set_base template 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(typename Bits_0::access_t(v)); write(typename Bits_1::access_t(v >> Bits_0::BITFIELD_WIDTH)); } @@ -646,10 +639,10 @@ class Genode::Register_set : public Register_set_base template 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 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 >(typename Bitset_2::access_t(v)); write(typename Bits_2::access_t(v >> (Bits_0::BITFIELD_WIDTH + Bits_1::BITFIELD_WIDTH))); diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index 78456ebfd8..0088a83e8f 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -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), diff --git a/repos/base/include/util/xml_node.h b/repos/base/include/util/xml_node.h index 782b42e825..d94f709102 100644 --- a/repos/base/include/util/xml_node.h +++ b/repos/base/include/util/xml_node.h @@ -50,7 +50,7 @@ class Genode::Xml_attribute /** * Define tokenizer that matches XML tags (with hyphens) as identifiers */ - typedef ::Genode::Token Token; + using Token = ::Genode::Token; 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(); diff --git a/repos/base/src/core/include/account.h b/repos/base/src/core/include/account.h index 6676cf5577..81412178b8 100644 --- a/repos/base/src/core/include/account.h +++ b/repos/base/src/core/include/account.h @@ -87,7 +87,7 @@ class Core::Account public: - typedef typename Quota_guard::Limit_exceeded Limit_exceeded; + using Limit_exceeded = typename Quota_guard::Limit_exceeded; class Unrelated_account : Exception { }; diff --git a/repos/base/src/core/include/cpu_thread_allocator.h b/repos/base/src/core/include/cpu_thread_allocator.h index aed50ebce6..4299c67db3 100644 --- a/repos/base/src/core/include/cpu_thread_allocator.h +++ b/repos/base/src/core/include/cpu_thread_allocator.h @@ -34,8 +34,8 @@ namespace Core { * We take the knowledge about the used backing-store allocator (sliced * heap) into account to make sure that slab blocks fill whole pages. */ - typedef Tslab - Cpu_thread_allocator; + using Cpu_thread_allocator = + Tslab; } #endif /* _CORE__INCLUDE__CPU_THREAD_ALLOCATOR_H_ */ diff --git a/repos/base/src/core/include/cpu_thread_component.h b/repos/base/src/core/include/cpu_thread_component.h index 5fd8fd4086..626f222464 100644 --- a/repos/base/src/core/include/cpu_thread_component.h +++ b/repos/base/src/core/include/cpu_thread_component.h @@ -40,7 +40,7 @@ class Core::Cpu_thread_component : public Rpc_object, { public: - typedef Trace::Thread_name Thread_name; + using Thread_name = Trace::Thread_name; using Pd_threads = Pd_session_component::Threads; diff --git a/repos/base/src/core/include/pager_object_exception_state.h b/repos/base/src/core/include/pager_object_exception_state.h index a3d0a9f902..b817059658 100644 --- a/repos/base/src/core/include/pager_object_exception_state.h +++ b/repos/base/src/core/include/pager_object_exception_state.h @@ -19,6 +19,6 @@ /* core includes */ #include -namespace Core { typedef Thread_state Pager_object_exception_state; } +namespace Core { using Pager_object_exception_state = Thread_state; } #endif /* _CORE__INCLUDE__PAGER_OBJECT_EXCEPTION_STATE_H_ */ diff --git a/repos/base/src/core/include/pd_session_component.h b/repos/base/src/core/include/pd_session_component.h index b4c1e6b5b1..a897de79e0 100644 --- a/repos/base/src/core/include/pd_session_component.h +++ b/repos/base/src/core/include/pd_session_component.h @@ -122,8 +122,8 @@ class Core::Pd_session_component : public Session_object public: - typedef Ram_dataspace_factory::Phys_range Phys_range; - typedef Ram_dataspace_factory::Virt_range Virt_range; + using Phys_range = Ram_dataspace_factory::Phys_range; + using Virt_range = Ram_dataspace_factory::Virt_range; /** * Constructor diff --git a/repos/base/src/core/include/ram_dataspace_factory.h b/repos/base/src/core/include/ram_dataspace_factory.h index 2bdb4b5ed6..c00a2858fb 100644 --- a/repos/base/src/core/include/ram_dataspace_factory.h +++ b/repos/base/src/core/include/ram_dataspace_factory.h @@ -32,7 +32,7 @@ class Core::Ram_dataspace_factory : public Ram_allocator, { public: - typedef Range_allocator::Range Phys_range; + using Phys_range = Range_allocator::Range; static Phys_range any_phys_range() { return { 0UL, ~0UL }; } diff --git a/repos/base/src/core/include/region_map_component.h b/repos/base/src/core/include/region_map_component.h index a62877cea0..d92e786a1d 100644 --- a/repos/base/src/core/include/region_map_component.h +++ b/repos/base/src/core/include/region_map_component.h @@ -392,8 +392,7 @@ class Core::Region_map_component : private Weak_object, * Dimension slab allocator for regions such that backing store is * allocated at the granularity of pages. */ - typedef Tslab - Ref_slab; + using Ref_slab = Tslab; Allocator_avl_tpl _map; /* region map for attach, detach, pagefaults */ diff --git a/repos/base/src/core/include/signal_source_component.h b/repos/base/src/core/include/signal_source_component.h index aff19f5dd1..817d86dc05 100644 --- a/repos/base/src/core/include/signal_source_component.h +++ b/repos/base/src/core/include/signal_source_component.h @@ -29,7 +29,7 @@ namespace Core { class Signal_context_component; class Signal_source_component; - typedef Fifo Signal_queue; + using Signal_queue = Fifo; struct Signal_context_slab; } diff --git a/repos/base/src/core/include/trace/subject_registry.h b/repos/base/src/core/include/trace/subject_registry.h index 00cdb5935a..7c934ce85b 100644 --- a/repos/base/src/core/include/trace/subject_registry.h +++ b/repos/base/src/core/include/trace/subject_registry.h @@ -306,7 +306,7 @@ class Core::Trace::Subject_registry { private: - typedef List Subjects; + using Subjects = List; Allocator &_md_alloc; Source_registry &_sources; diff --git a/repos/base/src/core/signal_receiver.cc b/repos/base/src/core/signal_receiver.cc index c1f97c7855..decb899325 100644 --- a/repos/base/src/core/signal_receiver.cc +++ b/repos/base/src/core/signal_receiver.cc @@ -49,7 +49,7 @@ void Signal_receiver::_platform_finish_dissolve(Signal_context &) { } void Signal_receiver::unblock_signal_waiter(Rpc_entrypoint &) { ASSERT_NEVER_CALLED; } -typedef Signal_context_capability Sigh_cap; +using Sigh_cap = Signal_context_capability; Sigh_cap Signal_receiver::manage(Signal_context &) { ASSERT_NEVER_CALLED; } diff --git a/repos/base/src/include/base/internal/capability_space_tpl.h b/repos/base/src/include/base/internal/capability_space_tpl.h index 17486f81a6..8fdf3b4aa6 100644 --- a/repos/base/src/include/base/internal/capability_space_tpl.h +++ b/repos/base/src/include/base/internal/capability_space_tpl.h @@ -82,7 +82,7 @@ class Genode::Capability_space_tpl { private: - typedef CAP_DATA Data; + using Data = CAP_DATA; /** * Supplement Native_capability::Data with the meta data needed to diff --git a/repos/base/src/include/base/internal/elf_format.h b/repos/base/src/include/base/internal/elf_format.h index 2fd9f7959a..2bcce2c246 100644 --- a/repos/base/src/include/base/internal/elf_format.h +++ b/repos/base/src/include/base/internal/elf_format.h @@ -37,36 +37,36 @@ extern "C" { #include /* type for a 16-bit quantity. */ -typedef genode_uint16_t Elf32_Half; -typedef genode_uint16_t Elf64_Half; +using Elf32_Half = genode_uint16_t; +using Elf64_Half = genode_uint16_t; /* types for signed and unsigned 32-bit quantities */ -typedef genode_uint32_t Elf32_Word; -typedef genode_int32_t Elf32_Sword; -typedef genode_uint32_t Elf64_Word; -typedef genode_int32_t Elf64_Sword; +using Elf32_Word = genode_uint32_t; +using Elf32_Sword = genode_int32_t; +using Elf64_Word = genode_uint32_t; +using Elf64_Sword = genode_int32_t; /* types for signed and unsigned 64-bit quantities */ -typedef genode_uint64_t Elf32_Xword; -typedef genode_int64_t Elf32_Sxword; -typedef genode_uint64_t Elf64_Xword; -typedef genode_int64_t Elf64_Sxword; +using Elf32_Xword = genode_uint64_t; +using Elf32_Sxword = genode_int64_t; +using Elf64_Xword = genode_uint64_t; +using Elf64_Sxword = genode_int64_t; /* type of addresses */ -typedef genode_uint32_t Elf32_Addr; -typedef genode_uint64_t Elf64_Addr; +using Elf32_Addr = genode_uint32_t; +using Elf64_Addr = genode_uint64_t; /* type of file offsets */ -typedef genode_uint32_t Elf32_Off; -typedef genode_uint64_t Elf64_Off; +using Elf32_Off = genode_uint32_t; +using Elf64_Off = genode_uint64_t; /* type for section indices, which are 16-bit quantities */ -typedef genode_uint16_t Elf32_Section; -typedef genode_uint16_t Elf64_Section; +using Elf32_Section = genode_uint16_t; +using Elf64_Section = genode_uint16_t; /* type for version symbol information */ -typedef Elf32_Half Elf32_Versym; -typedef Elf64_Half Elf64_Versym; +using Elf32_Versym = Elf32_Half; +using Elf64_Versym = Elf64_Half; /** @@ -74,7 +74,7 @@ typedef Elf64_Half Elf64_Versym; */ enum { EI_NIDENT = 16 }; -typedef struct +struct Elf32_Ehdr { unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ Elf32_Half e_type; /* Object file type */ @@ -90,9 +90,9 @@ typedef struct Elf32_Half e_shentsize; /* Section header table entry size */ Elf32_Half e_shnum; /* Section header table entry count */ Elf32_Half e_shstrndx; /* Section header string table index */ -} Elf32_Ehdr; +}; -typedef struct +struct Elf64_Ehdr { unsigned char e_ident[EI_NIDENT]; /* magic number and other info */ Elf64_Half e_type; /* object file type */ @@ -108,7 +108,7 @@ typedef struct Elf64_Half e_shentsize; /* section header table entry size */ Elf64_Half e_shnum; /* section header table entry count */ Elf64_Half e_shstrndx; /* section header string table index */ -} Elf64_Ehdr; +}; /** * Fields in the e_ident array. The EI_* macros are indices into the @@ -183,7 +183,7 @@ enum { /** * Program segment header */ -typedef struct +struct Elf32_Phdr { Elf32_Word p_type; /* segment type */ Elf32_Off p_offset; /* segment file offset */ @@ -193,9 +193,9 @@ typedef struct Elf32_Word p_memsz; /* segment size in memory */ Elf32_Word p_flags; /* segment flags */ Elf32_Word p_align; /* segment alignment */ -} Elf32_Phdr; +}; -typedef struct +struct Elf64_Phdr { Elf64_Word p_type; /* segment type */ Elf64_Word p_flags; /* segment flags */ @@ -205,7 +205,7 @@ typedef struct Elf64_Xword p_filesz; /* segment size in file */ Elf64_Xword p_memsz; /* segment size in memory */ Elf64_Xword p_align; /* segment alignment */ -} Elf64_Phdr; +}; /** * Legal values for p_type (segment type) @@ -242,12 +242,12 @@ enum { */ #ifdef _LP64 -typedef Elf64_Ehdr Elf_Ehdr; -typedef Elf64_Phdr Elf_Phdr; +using Elf_Ehdr = Elf64_Ehdr; +using Elf_Phdr = Elf64_Phdr; #define ELFCLASS ELFCLASS64 #else -typedef Elf32_Ehdr Elf_Ehdr; -typedef Elf32_Phdr Elf_Phdr; +using Elf_Ehdr = Elf32_Ehdr; +using Elf_Phdr = Elf32_Phdr; #define ELFCLASS ELFCLASS32 #endif /* _LP64 */ diff --git a/repos/base/src/include/base/internal/ipc_server.h b/repos/base/src/include/base/internal/ipc_server.h index 91b4ed803f..dfca2b0d4d 100644 --- a/repos/base/src/include/base/internal/ipc_server.h +++ b/repos/base/src/include/base/internal/ipc_server.h @@ -28,7 +28,7 @@ namespace Genode { void ipc_reply(Native_capability caller, Rpc_exception_code, Msgbuf_base &snd_msg); - typedef Native_capability Reply_capability; + using Reply_capability = Native_capability; struct Rpc_request { diff --git a/repos/base/src/include/base/internal/stack.h b/repos/base/src/include/base/internal/stack.h index c2f13382c7..0c5cd82ca9 100644 --- a/repos/base/src/include/base/internal/stack.h +++ b/repos/base/src/include/base/internal/stack.h @@ -74,7 +74,7 @@ class Genode::Stack { public: - typedef Cpu_session::Name Name; + using Name = Cpu_session::Name; private: diff --git a/repos/base/src/include/base/internal/upgradeable_client.h b/repos/base/src/include/base/internal/upgradeable_client.h index 3bfeb97a21..3137e22af8 100644 --- a/repos/base/src/include/base/internal/upgradeable_client.h +++ b/repos/base/src/include/base/internal/upgradeable_client.h @@ -26,7 +26,7 @@ namespace Genode { template struct Upgradeable_client; } template struct Genode::Upgradeable_client : CLIENT { - typedef Genode::Capability Capability; + using Capability = Genode::Capability; Parent &_parent; Parent::Client::Id _id; diff --git a/repos/base/src/lib/base/default_log.cc b/repos/base/src/lib/base/default_log.cc index 161b9144cd..5cde155e02 100644 --- a/repos/base/src/lib/base/default_log.cc +++ b/repos/base/src/lib/base/default_log.cc @@ -105,8 +105,7 @@ void Genode::init_log(Parent &parent) } }; - typedef Buffered_output - Buffered_log_output; + using Buffered_log_output = Buffered_output; static Buffered_log_output *buffered_log_output = unmanaged_singleton(Write_fn()); diff --git a/repos/base/src/lib/base/raw_output.cc b/repos/base/src/lib/base/raw_output.cc index a9744e4503..3da8ac8aaf 100644 --- a/repos/base/src/lib/base/raw_output.cc +++ b/repos/base/src/lib/base/raw_output.cc @@ -24,7 +24,7 @@ Genode::Output &Genode::Raw::_output() { struct Write_fn { void operator () (char const *s) { raw_write_string(s); } }; - typedef Buffered_output<256, Write_fn> Buffered_raw_output; + using Buffered_raw_output = Buffered_output<256, Write_fn>; static Buffered_raw_output *buffered_raw_output = unmanaged_singleton(Write_fn()); diff --git a/repos/base/src/lib/base/root_proxy.cc b/repos/base/src/lib/base/root_proxy.cc index b642aa2c07..6edd08deda 100644 --- a/repos/base/src/lib/base/root_proxy.cc +++ b/repos/base/src/lib/base/root_proxy.cc @@ -25,7 +25,7 @@ namespace { struct Service { - typedef Session_state::Name Name; + using Name = Session_state::Name; Name name; Capability root; @@ -159,14 +159,14 @@ void Root_proxy::_handle_session_request(Xml_node request, char const *type) Parent::Server::Id const id { request.attribute_value("id", 0UL) }; - typedef Service::Session Session; + using Session = Service::Session; if (request.has_type("create")) { 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(); /* construct session */ diff --git a/repos/base/src/lib/base/session_state.cc b/repos/base/src/lib/base/session_state.cc index bf0184df93..204a27cf23 100644 --- a/repos/base/src/lib/base/session_state.cc +++ b/repos/base/src/lib/base/session_state.cc @@ -27,7 +27,7 @@ struct Formatted_phase void print(Output &output) const { using Genode::print; - typedef Genode::Session_state State; + using State = Genode::Session_state; switch (_phase) { case State::CREATE_REQUESTED: print(output, "CREATE_REQUESTED"); break; diff --git a/repos/base/src/lib/cxx/guard.cc b/repos/base/src/lib/cxx/guard.cc index 4c8c599fda..55324eaec5 100644 --- a/repos/base/src/lib/cxx/guard.cc +++ b/repos/base/src/lib/cxx/guard.cc @@ -21,7 +21,7 @@ #include -typedef Genode::Registry > Blockers; +using Blockers = Genode::Registry >; static Blockers *blockers_ptr; @@ -53,7 +53,7 @@ namespace __cxxabiv1 * registry and will be woken up by the thread releasing a guard. */ - typedef int __guard; + using __guard = int; extern "C" int __cxa_guard_acquire(__guard *guard) { diff --git a/repos/base/src/lib/cxx/malloc_free.cc b/repos/base/src/lib/cxx/malloc_free.cc index 67f237a572..7b744c5545 100644 --- a/repos/base/src/lib/cxx/malloc_free.cc +++ b/repos/base/src/lib/cxx/malloc_free.cc @@ -63,7 +63,7 @@ void Genode::init_cxx_heap(Ram_allocator &ram, Region_map &rm) } -typedef unsigned long Block_header; +using Block_header = unsigned long; extern "C" void *malloc(size_t size) diff --git a/repos/base/src/lib/ldso/include/config.h b/repos/base/src/lib/ldso/include/config.h index c5851d77a0..d4d9c3d8b5 100644 --- a/repos/base/src/lib/ldso/include/config.h +++ b/repos/base/src/lib/ldso/include/config.h @@ -58,7 +58,7 @@ class Linker::Config : Noncopyable bool verbose() const { return _verbose; } bool check_ctors() const { return _check_ctors; } - typedef String<100> Rom_name; + using Rom_name = String<100>; /** * Call fn for each library specified in the configuration diff --git a/repos/base/src/lib/ldso/include/elf.h b/repos/base/src/lib/ldso/include/elf.h index 1c908bca3b..2b59bf559c 100644 --- a/repos/base/src/lib/ldso/include/elf.h +++ b/repos/base/src/lib/ldso/include/elf.h @@ -23,36 +23,36 @@ namespace Linker { /* standard ELF types. */ /* type for a 16-bit quantity. */ - typedef genode_uint16_t Elf32_Half; - typedef genode_uint16_t Elf64_Half; + using Elf32_Half = genode_uint16_t; + using Elf64_Half = genode_uint16_t; /* types for signed and unsigned 32-bit quantities */ - typedef genode_uint32_t Elf32_Word; - typedef genode_int32_t Elf32_Sword; - typedef genode_uint32_t Elf64_Word; - typedef genode_int32_t Elf64_Sword; + using Elf32_Word = genode_uint32_t; + using Elf32_Sword = genode_int32_t; + using Elf64_Word = genode_uint32_t; + using Elf64_Sword = genode_int32_t; /* types for signed and unsigned 64-bit quantities */ - typedef genode_uint64_t Elf32_Xword; - typedef genode_int64_t Elf32_Sxword; - typedef genode_uint64_t Elf64_Xword; - typedef genode_int64_t Elf64_Sxword; + using Elf32_Xword = genode_uint64_t; + using Elf32_Sxword = genode_int64_t; + using Elf64_Xword = genode_uint64_t; + using Elf64_Sxword = genode_int64_t; /* type of addresses */ - typedef genode_uint32_t Elf32_Addr; - typedef genode_uint64_t Elf64_Addr; + using Elf32_Addr = genode_uint32_t; + using Elf64_Addr = genode_uint64_t; /* type of file offsets */ - typedef genode_uint32_t Elf32_Off; - typedef genode_uint64_t Elf64_Off; + using Elf32_Off = genode_uint32_t; + using Elf64_Off = genode_uint64_t; /* type for section indices, which are 16-bit quantities */ - typedef genode_uint16_t Elf32_Section; - typedef genode_uint16_t Elf64_Section; + using Elf32_Section = genode_uint16_t; + using Elf64_Section = genode_uint16_t; /* type for version symbol information */ - typedef Elf32_Half Elf32_Versym; - typedef Elf64_Half Elf64_Versym; + using Elf32_Versym = Elf32_Half; + using Elf64_Versym = Elf64_Half; /** * Fields in the e_ident array of ELF file header The EI_* macros are indices @@ -210,10 +210,10 @@ namespace Linker { namespace Elf32 { - typedef Elf32_Addr Addr; - typedef Elf32_Word Hashelt; - typedef Elf32_Word Size; - typedef Elf32_Half Half; + using Addr = Elf32_Addr; + using Hashelt = Elf32_Word; + using Size = Elf32_Word; + using Half = Elf32_Half; /** * The ELF file header @@ -329,10 +329,10 @@ namespace Linker { namespace Elf64 { - typedef Elf64_Addr Addr; - typedef Elf64_Word Hashelt; - typedef Elf64_Xword Size; - typedef Elf64_Half Half; + using Addr = Elf64_Addr; + using Hashelt = Elf64_Word; + using Size = Elf64_Xword; + using Half = Elf64_Half; /** * ELF header diff --git a/repos/base/src/lib/ldso/include/file.h b/repos/base/src/lib/ldso/include/file.h index b9d8e94859..b57669217f 100644 --- a/repos/base/src/lib/ldso/include/file.h +++ b/repos/base/src/lib/ldso/include/file.h @@ -97,7 +97,7 @@ struct Linker::Elf_file : File Ram_dataspace_capability ram_cap[Phdr::MAX_PHDR]; bool const loaded; - typedef String<64> Name; + using Name = String<64>; Rom_dataspace_capability _rom_dataspace(Name const &name) { diff --git a/repos/base/src/lib/ldso/include/linker.h b/repos/base/src/lib/ldso/include/linker.h index 2820c171bc..afacac9de9 100644 --- a/repos/base/src/lib/ldso/include/linker.h +++ b/repos/base/src/lib/ldso/include/linker.h @@ -145,7 +145,7 @@ class Linker::Object : private Fifo::Element, public: - typedef String<128> Name; + using Name = String<128>; class Object_list; protected: diff --git a/repos/base/src/lib/ldso/include/region_map.h b/repos/base/src/lib/ldso/include/region_map.h index da7f7c85d5..bbec312610 100644 --- a/repos/base/src/lib/ldso/include/region_map.h +++ b/repos/base/src/lib/ldso/include/region_map.h @@ -76,7 +76,7 @@ class Linker::Region_map public: - typedef Constructible Constructible_region_map; + using Constructible_region_map = Constructible; static Constructible_region_map &r(); diff --git a/repos/base/src/lib/ldso/spec/arm/relocation.h b/repos/base/src/lib/ldso/spec/arm/relocation.h index 1b4ffebb92..66a42d55ca 100644 --- a/repos/base/src/lib/ldso/spec/arm/relocation.h +++ b/repos/base/src/lib/ldso/spec/arm/relocation.h @@ -29,10 +29,10 @@ namespace Linker { class Reloc_non_plt; - typedef Plt_got_generic<2> Plt_got; - typedef Reloc_plt_generic Reloc_plt; - typedef Reloc_jmpslot_generic Reloc_jmpslot; - typedef Reloc_bind_now_generic Reloc_bind_now; + using Plt_got = Plt_got_generic<2>; + using Reloc_plt = Reloc_plt_generic; + using Reloc_jmpslot = Reloc_jmpslot_generic; + using Reloc_bind_now = Reloc_bind_now_generic; }; diff --git a/repos/base/src/lib/ldso/spec/arm_64/relocation.h b/repos/base/src/lib/ldso/spec/arm_64/relocation.h index e423491f47..3cc0e45dbd 100644 --- a/repos/base/src/lib/ldso/spec/arm_64/relocation.h +++ b/repos/base/src/lib/ldso/spec/arm_64/relocation.h @@ -33,10 +33,10 @@ namespace Linker { class Reloc_non_plt; - typedef Plt_got_generic<2> Plt_got; - typedef Reloc_plt_generic Reloc_plt; - typedef Reloc_jmpslot_generic Reloc_jmpslot; - typedef Reloc_bind_now_generic Reloc_bind_now; + using Plt_got = Plt_got_generic<2>; + using Reloc_plt = Reloc_plt_generic; + using Reloc_jmpslot = Reloc_jmpslot_generic; + using Reloc_bind_now = Reloc_bind_now_generic; }; class Linker::Reloc_non_plt : public Reloc_non_plt_generic diff --git a/repos/base/src/lib/ldso/spec/riscv/relocation.h b/repos/base/src/lib/ldso/spec/riscv/relocation.h index ca86d2fcf1..8e5fdb0f58 100644 --- a/repos/base/src/lib/ldso/spec/riscv/relocation.h +++ b/repos/base/src/lib/ldso/spec/riscv/relocation.h @@ -38,10 +38,10 @@ namespace Linker { class Reloc_non_plt; - typedef Plt_got_generic<0> Plt_got; - typedef Reloc_plt_generic Reloc_plt; - typedef Reloc_jmpslot_generic Reloc_jmpslot; - typedef Reloc_bind_now_generic Reloc_bind_now; + using Plt_got = Plt_got_generic<0>; + using Reloc_plt = Reloc_plt_generic; + using Reloc_jmpslot = Reloc_jmpslot_generic; + using Reloc_bind_now = Reloc_bind_now_generic; }; class Linker::Reloc_non_plt : public Reloc_non_plt_generic diff --git a/repos/base/src/lib/ldso/spec/x86_32/relocation.h b/repos/base/src/lib/ldso/spec/x86_32/relocation.h index 0b01cf2934..68c48a6af9 100644 --- a/repos/base/src/lib/ldso/spec/x86_32/relocation.h +++ b/repos/base/src/lib/ldso/spec/x86_32/relocation.h @@ -29,10 +29,10 @@ namespace Linker { class Reloc_non_plt; - typedef Plt_got_generic<2> Plt_got; - typedef Reloc_plt_generic Reloc_plt; - typedef Reloc_jmpslot_generic Reloc_jmpslot; - typedef Reloc_bind_now_generic Reloc_bind_now; + using Plt_got = Plt_got_generic<2>; + using Reloc_plt = Reloc_plt_generic; + using Reloc_jmpslot = Reloc_jmpslot_generic; + using Reloc_bind_now = Reloc_bind_now_generic; } diff --git a/repos/base/src/lib/ldso/spec/x86_64/relocation.h b/repos/base/src/lib/ldso/spec/x86_64/relocation.h index a95f15c08f..f28966ffe4 100644 --- a/repos/base/src/lib/ldso/spec/x86_64/relocation.h +++ b/repos/base/src/lib/ldso/spec/x86_64/relocation.h @@ -32,10 +32,10 @@ namespace Linker { class Reloc_non_plt; - typedef Plt_got_generic<2> Plt_got; - typedef Reloc_plt_generic Reloc_plt; - typedef Reloc_jmpslot_generic Reloc_jmpslot; - typedef Reloc_bind_now_generic Reloc_bind_now; + using Plt_got = Plt_got_generic<2>; + using Reloc_plt = Reloc_plt_generic; + using Reloc_jmpslot = Reloc_jmpslot_generic; + using Reloc_bind_now = Reloc_bind_now_generic; }; class Linker::Reloc_non_plt : public Reloc_non_plt_generic diff --git a/repos/base/src/test/log/main.cc b/repos/base/src/test/log/main.cc index a07a36a781..c3a4d97328 100644 --- a/repos/base/src/test/log/main.cc +++ b/repos/base/src/test/log/main.cc @@ -30,7 +30,7 @@ void Component::construct(Genode::Env &env) log("floating point: ", 1700.0 / 1000); - typedef String<128> Label; + using Label = String<128>; log("multiarg string: ", Label(Char('"'), "parent -> child.", 7, Char('"'))); String<32> hex(Hex(3)); diff --git a/repos/base/src/test/mmio/main.cc b/repos/base/src/test/mmio/main.cc index 52423e1060..a94f9947f2 100644 --- a/repos/base/src/test/mmio/main.cc +++ b/repos/base/src/test/mmio/main.cc @@ -439,7 +439,7 @@ void Component::construct(Genode::Env &env) **********************************/ { /* whole register */ - typedef Test_mmio::Reg_64 Reg; + using Reg = Test_mmio::Reg_64; enum { REG = 0x0123456789abcdef }; static uint8_t cmp_mem[MMIO_SIZE] = { 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01 }; @@ -506,7 +506,7 @@ void Component::construct(Genode::Env &env) } /* bitsets */ - typedef Test_mmio::Bitset_64 Bitset; + using Bitset = Test_mmio::Bitset_64; enum { BITSET = 0x4abcdef056789123 }; zero_mem(mmio_mem, MMIO_SIZE); mmio.write(BITSET); diff --git a/repos/base/src/test/registry/main.cc b/repos/base/src/test/registry/main.cc index a4806e8a55..1b9ae4db5c 100644 --- a/repos/base/src/test/registry/main.cc +++ b/repos/base/src/test/registry/main.cc @@ -28,7 +28,7 @@ static void test_exception_during_for_each() struct Item : Interface { - typedef String<10> Name; + using Name = String<10>; Name const name; Item(Name const &name) : name(name) { } diff --git a/repos/base/src/test/rm_fault/main.cc b/repos/base/src/test/rm_fault/main.cc index 465d7ba989..b558bc4797 100644 --- a/repos/base/src/test/rm_fault/main.cc +++ b/repos/base/src/test/rm_fault/main.cc @@ -167,8 +167,8 @@ class Test_child_policy : public Child_policy { public: - typedef Registered Parent_service; - typedef Registry Parent_services; + using Parent_service = Registered; + using Parent_services = Registry; private: diff --git a/repos/base/src/test/smp/main.cc b/repos/base/src/test/smp/main.cc index 9274f87d5f..8880bfa0cb 100644 --- a/repos/base/src/test/smp/main.cc +++ b/repos/base/src/test/smp/main.cc @@ -73,7 +73,7 @@ namespace Mp_server_test { Genode::Native_capability test_cap_reply(Genode::Native_capability); }; - typedef Genode::Capability Capability; + using Capability = Genode::Capability; struct Cpu_compound { diff --git a/repos/base/src/test/token/main.cc b/repos/base/src/test/token/main.cc index dcfdcaae19..20ffd6fb1a 100644 --- a/repos/base/src/test/token/main.cc +++ b/repos/base/src/test/token/main.cc @@ -61,7 +61,7 @@ static void test_out_of_bounds_access(Env &env) char * const token_ptr = buf_ptr + BUF_SIZE - input_len; memcpy(token_ptr, input, input_len); - typedef ::Genode::Token Token; + using Token = ::Genode::Token; Token t(token_ptr, input_len); diff --git a/repos/dde_linux/src/driver/usb_hid/led_state.h b/repos/dde_linux/src/driver/usb_hid/led_state.h index c35c5db955..99a988da51 100644 --- a/repos/dde_linux/src/driver/usb_hid/led_state.h +++ b/repos/dde_linux/src/driver/usb_hid/led_state.h @@ -25,7 +25,7 @@ struct Usb::Led_state { Genode::Env &_env; - typedef Genode::String<32> Name; + using Name = Genode::String<32>; Name const _name; @@ -37,8 +37,8 @@ struct Usb::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()); diff --git a/repos/dde_linux/src/driver/wifi/util.h b/repos/dde_linux/src/driver/wifi/util.h index 14833bcf31..0db3931afc 100644 --- a/repos/dde_linux/src/driver/wifi/util.h +++ b/repos/dde_linux/src/driver/wifi/util.h @@ -17,14 +17,14 @@ /* Genode includes */ #include -typedef unsigned long size_t; -typedef long long ssize_t; -typedef unsigned char uint8_t; +using size_t = unsigned long; +using ssize_t = long long; +using uint8_t = unsigned char; namespace Util { - using size_t = Genode::size_t; + using size_t = Genode::size_t; using uint8_t = Genode::uint8_t; size_t next_char(char const *s, size_t start, char const c) diff --git a/repos/dde_linux/src/lib/lxip/genode_c_api/nic_client.cc b/repos/dde_linux/src/lib/lxip/genode_c_api/nic_client.cc index a16e3fe425..4b7f4dc0be 100644 --- a/repos/dde_linux/src/lib/lxip/genode_c_api/nic_client.cc +++ b/repos/dde_linux/src/lib/lxip/genode_c_api/nic_client.cc @@ -99,7 +99,7 @@ struct genode_nic_client : private Noncopyable, private Interface if (!tx_source.ready_to_submit(1)) return progress; - typedef Nic::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Nic::Packet_descriptor; Packet_descriptor packet { }; size_t const max_bytes = Nic::Packet_allocator::OFFSET_PACKET_SIZE; @@ -138,7 +138,7 @@ struct genode_nic_client : private Noncopyable, private Interface if (!rx_sink.packet_avail() || !rx_sink.ack_slots_free()) break; - typedef Nic::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Nic::Packet_descriptor; Packet_descriptor const packet = rx_sink.peek_packet(); diff --git a/repos/dde_linux/src/lib/lxip/socket.cc b/repos/dde_linux/src/lib/lxip/socket.cc index fb910f3c36..543a6d06a5 100644 --- a/repos/dde_linux/src/lib/lxip/socket.cc +++ b/repos/dde_linux/src/lib/lxip/socket.cc @@ -30,7 +30,7 @@ using namespace Genode; struct Lx_call; -typedef Fifo Socket_queue; +using Socket_queue = Fifo; struct genode_socket_handle diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index ca993f9bb6..31fe6c9a39 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -157,7 +157,7 @@ namespace Vfs { class Lxip_vfs_dir_handle; class Lxip_file_system; - typedef Genode::List > Lxip_vfs_file_handles; + using Lxip_vfs_file_handles = Genode::List >; } @@ -228,7 +228,7 @@ struct Vfs::Directory : Vfs::Node virtual Vfs::Node *child(char const *) = 0; virtual file_size num_dirent() = 0; - typedef Vfs::Directory_service::Open_result Open_result; + using Open_result = Vfs::Directory_service::Open_result; virtual Open_result open(Vfs::File_system &fs, Genode::Allocator &alloc, char const*, unsigned, Vfs::Vfs_handle**) = 0; @@ -253,7 +253,7 @@ struct Lxip::Protocol_dir : Vfs::Directory struct Lxip::Socket_dir : Vfs::Directory { - typedef Vfs::Directory_service::Open_result Open_result; + using Open_result = Vfs::Directory_service::Open_result; virtual Protocol_dir &parent() = 0; virtual char const *top_dir() = 0; @@ -272,9 +272,9 @@ struct Lxip::Socket_dir : Vfs::Directory struct Vfs::Lxip_vfs_handle : Vfs::Vfs_handle { - typedef File_io_service:: Read_result Read_result; - typedef File_io_service::Write_result Write_result; - typedef File_io_service::Sync_result Sync_result; + using Read_result = File_io_service:: Read_result; + using Write_result = File_io_service::Write_result; + using Sync_result = File_io_service::Sync_result; Lxip_vfs_handle(Vfs::File_system &fs, Allocator &alloc, int status_flags) : Vfs::Vfs_handle(fs, fs, alloc, status_flags) { } @@ -303,8 +303,8 @@ struct Vfs::Lxip_vfs_file_handle final : Vfs::Lxip_vfs_handle List_element file_le { this }; /* notification elements */ - typedef Genode::Fifo_element Fifo_element; - typedef Genode::Fifo Fifo; + using Fifo_element = Genode::Fifo_element; + using Fifo = Genode::Fifo; Fifo_element read_ready_elem { *this }; @@ -1055,7 +1055,7 @@ class Vfs::Lxip_socket_dir final : public Lxip::Socket_dir long read(Byte_range_ptr const &dst, file_size seek_offset) override { - typedef Vfs::Directory_service::Dirent Dirent; + using Dirent = Vfs::Directory_service::Dirent; if (dst.num_bytes < sizeof(Dirent)) return -1; @@ -1379,7 +1379,7 @@ class Lxip::Protocol_dir_impl : public Protocol_dir long read(Vfs::Byte_range_ptr const &dst, Vfs::file_size seek_offset) override { - typedef Vfs::Directory_service::Dirent Dirent; + using Dirent = Vfs::Directory_service::Dirent; if (dst.num_bytes < sizeof(Dirent)) return -1; @@ -1408,7 +1408,7 @@ class Lxip::Protocol_dir_impl : public Protocol_dir return -1; } - typedef Vfs::Directory_service::Dirent_type Dirent_type; + using Dirent_type = Vfs::Directory_service::Dirent_type; Dirent_type const type = dynamic_cast(node) ? Dirent_type::DIRECTORY : @@ -1602,7 +1602,7 @@ class Vfs::Lxip_file_system : public Vfs::File_system, void apply_config(Genode::Xml_node const &config) override { - typedef String<16> Addr; + using Addr = String<16>; unsigned const mtu = config.attribute_value("mtu", 0U); if (mtu) { diff --git a/repos/dde_rump/src/include/util/allocator_fap.h b/repos/dde_rump/src/include/util/allocator_fap.h index a3151f5b07..7872151ad8 100644 --- a/repos/dde_rump/src/include/util/allocator_fap.h +++ b/repos/dde_rump/src/include/util/allocator_fap.h @@ -60,9 +60,9 @@ namespace Allocator { ELEMENTS = VM_SIZE / BLOCK_SIZE, /* MAX number of dataspaces in VM */ }; - typedef Genode::addr_t addr_t; - typedef Genode::Ram_dataspace_capability Ram_dataspace_capability; - typedef Genode::Allocator_avl Allocator_avl; + using addr_t = Genode::addr_t; + using Ram_dataspace_capability = Genode::Ram_dataspace_capability; + using Allocator_avl = Genode::Allocator_avl; addr_t _base; /* virt. base address */ Cache _cache; /* non-/cached RAM */ @@ -202,7 +202,7 @@ namespace Allocator { { private: - typedef Allocator::Backend_alloc Backend_alloc; + using Backend_alloc = Allocator::Backend_alloc; Backend_alloc _back_allocator; diff --git a/repos/dde_rump/src/lib/rump/bootstrap.cc b/repos/dde_rump/src/lib/rump/bootstrap.cc index dbcd347abf..b2c2b056f3 100644 --- a/repos/dde_rump/src/lib/rump/bootstrap.cc +++ b/repos/dde_rump/src/lib/rump/bootstrap.cc @@ -25,11 +25,11 @@ extern "C" { #ifdef _LP64 -typedef Elf64_Dyn Elf_Dyn; -typedef Elf64_Sym Elf_Sym; +using Elf_Dyn = Elf64_Dyn; +using Elf_Sym = Elf64_Sym; #else -typedef Elf32_Dyn Elf_Dyn; -typedef Elf32_Sym Elf_Sym; +using Elf_Dyn = Elf32_Dyn; +using Elf_Sym = Elf32_Sym; #endif static bool const verbose = false; diff --git a/repos/dde_rump/src/lib/rump/hypercall.cc b/repos/dde_rump/src/lib/rump/hypercall.cc index c273b4ae09..555e03a5ea 100644 --- a/repos/dde_rump/src/lib/rump/hypercall.cc +++ b/repos/dde_rump/src/lib/rump/hypercall.cc @@ -254,7 +254,7 @@ struct Allocator_policy }; -typedef Allocator::Fap Rump_alloc; +using Rump_alloc = Allocator::Fap; static Genode::Mutex & alloc_mutex() { diff --git a/repos/dde_rump/src/lib/rump/io.cc b/repos/dde_rump/src/lib/rump/io.cc index 8dea4a3c26..469b870e83 100644 --- a/repos/dde_rump/src/lib/rump/io.cc +++ b/repos/dde_rump/src/lib/rump/io.cc @@ -34,7 +34,7 @@ class Io_signal_blockade : public Genode::Io_signal_handler bool _signal_handler_called { false }; - typedef Genode::Registered_no_delete Registered_blockade; + using Registered_blockade = Genode::Registered_no_delete; Genode::Registry _blockades; void _handle_io_signal() diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index e1636afe5a..ee4fdb6177 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -63,17 +63,17 @@ class Vfs::Rump_file_system : public File_system enum { BUFFER_SIZE = 4096 }; - typedef Genode::Path Path; + using Path = Genode::Path; Vfs::Env &_env; struct Rump_vfs_dir_handle; struct Rump_watch_handle; - typedef Genode::List Rump_watch_handles; + using Rump_watch_handles = Genode::List; Rump_watch_handles _watchers { }; struct Rump_vfs_file_handle; - typedef Genode::List Rump_vfs_file_handles; + using Rump_vfs_file_handles = Genode::List; Rump_vfs_file_handles _file_handles; struct Rump_vfs_handle : public Vfs_handle @@ -414,7 +414,7 @@ class Vfs::Rump_file_system : public File_system Rump_file_system(Vfs::Env &env, Xml_node const &config) : _env(env) { - typedef Genode::String<16> Fs_type; + using Fs_type = Genode::String<16>; Fs_type fs_type = config.attribute_value("fs", Fs_type()); diff --git a/repos/demo/include/launchpad/launchpad.h b/repos/demo/include/launchpad/launchpad.h index b609869def..0ab3a47f69 100644 --- a/repos/demo/include/launchpad/launchpad.h +++ b/repos/demo/include/launchpad/launchpad.h @@ -41,13 +41,11 @@ class Launchpad_child : public Genode::Child_policy, public: - typedef Genode::Child_policy::Name Name; - - typedef Genode::Registered Child_service; - typedef Genode::Registered Parent_service; - - typedef Genode::Registry Child_services; - typedef Genode::Registry Parent_services; + using Name = Genode::Child_policy::Name; + using Child_service = Genode::Registered; + using Parent_service = Genode::Registered; + using Child_services = Genode::Registry; + using Parent_services = Genode::Registry; private: @@ -244,8 +242,8 @@ class Launchpad public: - typedef Genode::Cap_quota Cap_quota; - typedef Genode::Ram_quota Ram_quota; + using Cap_quota = Genode::Cap_quota; + using Ram_quota = Genode::Ram_quota; Launchpad(Genode::Env &env, unsigned long initial_quota); diff --git a/repos/demo/include/scout/canvas.h b/repos/demo/include/scout/canvas.h index 0c52658b88..205d2935ed 100644 --- a/repos/demo/include/scout/canvas.h +++ b/repos/demo/include/scout/canvas.h @@ -32,7 +32,7 @@ namespace Scout { using Genode::Color; using Genode::Pixel_rgba; - typedef Text_painter::Font Font; + using Font = Text_painter::Font; struct Canvas_base; template class Canvas; diff --git a/repos/demo/include/scout/graphics_backend_impl.h b/repos/demo/include/scout/graphics_backend_impl.h index 506da8ea62..b73b8b48f2 100644 --- a/repos/demo/include/scout/graphics_backend_impl.h +++ b/repos/demo/include/scout/graphics_backend_impl.h @@ -56,7 +56,7 @@ class Scout::Graphics_backend_impl : public Graphics_backend Genode::Attached_dataspace _fb_ds { _local_rm, _init_fb_ds(_max_size) }; - typedef Gui::Session::View_handle View_handle; + using View_handle = Gui::Session::View_handle; Point _position; Area _view_size; @@ -66,7 +66,7 @@ class Scout::Graphics_backend_impl : public Graphics_backend void _update_viewport() { - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; Gui::Rect rect(_position, _view_size); _gui.enqueue(_view, rect); @@ -113,7 +113,7 @@ class Scout::Graphics_backend_impl : public Graphics_backend { bring_to_front(); - typedef Genode::Pixel_rgb888 PT; + using PT = Genode::Pixel_rgb888; static Canvas canvas_0(_base(0), max_size, alloc); static Canvas canvas_1(_base(1), max_size, alloc); @@ -132,7 +132,7 @@ class Scout::Graphics_backend_impl : public Graphics_backend void copy_back_to_front(Rect rect) override { - typedef Genode::Pixel_rgb888 PT; + using PT = Genode::Pixel_rgb888; PT const *src = _base( _back_idx()); PT *dst = _base(_front_idx()); @@ -163,8 +163,8 @@ class Scout::Graphics_backend_impl : public Graphics_backend void bring_to_front() override { - typedef Gui::Session::Command Command; - typedef Gui::Session::View_handle View_handle; + using Command = Gui::Session::Command; + using View_handle = Gui::Session::View_handle; _gui.enqueue(_view, View_handle()); _gui.execute(); } diff --git a/repos/demo/include/scout/platform.h b/repos/demo/include/scout/platform.h index 4cbf1ca573..4f674d51e8 100644 --- a/repos/demo/include/scout/platform.h +++ b/repos/demo/include/scout/platform.h @@ -27,9 +27,9 @@ namespace Scout { - typedef Genode::Point<> Point; - typedef Genode::Area<> Area; - typedef Genode::Rect<> Rect; + using Point = Genode::Point<>; + using Area = Genode::Area<>; + using Rect = Genode::Rect<>; class Platform; } diff --git a/repos/demo/include/scout/tick.h b/repos/demo/include/scout/tick.h index 327bd8f350..006287962e 100644 --- a/repos/demo/include/scout/tick.h +++ b/repos/demo/include/scout/tick.h @@ -21,7 +21,7 @@ class Scout::Tick { public: - typedef unsigned long time; + using time = unsigned long; private: diff --git a/repos/demo/include/scout/types.h b/repos/demo/include/scout/types.h index d225e0adf1..49abc0aabd 100644 --- a/repos/demo/include/scout/types.h +++ b/repos/demo/include/scout/types.h @@ -18,9 +18,9 @@ namespace Scout { - typedef Genode::Point<> Point; - typedef Genode::Area<> Area; - typedef Genode::Rect<> Rect; + using Point = Genode::Point<>; + using Area = Genode::Area<>; + using Rect = Genode::Rect<>; using size_t = Genode::size_t; using uint8_t = Genode::uint8_t; diff --git a/repos/demo/include/scout_gfx/horizontal_shadow_painter.h b/repos/demo/include/scout_gfx/horizontal_shadow_painter.h index 81925e2b00..837b8e49a0 100644 --- a/repos/demo/include/scout_gfx/horizontal_shadow_painter.h +++ b/repos/demo/include/scout_gfx/horizontal_shadow_painter.h @@ -18,7 +18,7 @@ struct Horizontal_shadow_painter { - typedef Genode::Surface_base::Rect Rect; + using Rect = Genode::Surface_base::Rect; template static inline void paint(Genode::Surface &surface, Rect rect, diff --git a/repos/demo/include/scout_gfx/icon_painter.h b/repos/demo/include/scout_gfx/icon_painter.h index 318d557f3e..af4af744e9 100644 --- a/repos/demo/include/scout_gfx/icon_painter.h +++ b/repos/demo/include/scout_gfx/icon_painter.h @@ -154,8 +154,8 @@ class Icon_painter public: - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Rect Rect; + using Area = Genode::Surface_base::Area; + using Rect = Genode::Surface_base::Rect; template diff --git a/repos/demo/include/scout_gfx/refracted_icon_painter.h b/repos/demo/include/scout_gfx/refracted_icon_painter.h index b95f99ed7c..5efa472e76 100644 --- a/repos/demo/include/scout_gfx/refracted_icon_painter.h +++ b/repos/demo/include/scout_gfx/refracted_icon_painter.h @@ -26,9 +26,9 @@ namespace Scout { struct Refracted_icon_painter; } */ struct Scout::Refracted_icon_painter { - 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; template diff --git a/repos/demo/include/scout_gfx/sky_texture_painter.h b/repos/demo/include/scout_gfx/sky_texture_painter.h index 2871d53f8d..2a58a5e44f 100644 --- a/repos/demo/include/scout_gfx/sky_texture_painter.h +++ b/repos/demo/include/scout_gfx/sky_texture_painter.h @@ -20,9 +20,9 @@ struct Sky_texture_painter { - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Color Color; + using Area = Genode::Surface_base::Area; + using Rect = Genode::Surface_base::Rect; + using Color = Genode::Color; template diff --git a/repos/demo/src/app/launchpad/loadbar.h b/repos/demo/src/app/launchpad/loadbar.h index fd6c4dc934..b27590e90e 100644 --- a/repos/demo/src/app/launchpad/loadbar.h +++ b/repos/demo/src/app/launchpad/loadbar.h @@ -229,7 +229,7 @@ class Kbyte_loadbar : public Loadbar { private: - typedef Genode::String<32> Label; + using Label = Genode::String<32>; Label _label { }; diff --git a/repos/demo/src/app/launchpad/section.h b/repos/demo/src/app/launchpad/section.h index f08d505c96..deb70ac727 100644 --- a/repos/demo/src/app/launchpad/section.h +++ b/repos/demo/src/app/launchpad/section.h @@ -22,7 +22,7 @@ class Section : public Scout::Parent_element { private: - typedef Scout::size_t size_t; + using size_t = Scout::size_t; /* * Noncopyable diff --git a/repos/demo/src/app/scout/elements.h b/repos/demo/src/app/scout/elements.h index 1e17812efe..93687b1cd1 100644 --- a/repos/demo/src/app/scout/elements.h +++ b/repos/demo/src/app/scout/elements.h @@ -45,7 +45,7 @@ namespace Scout { * An anchor marks a location within a document that can be addressed by a * link. */ - typedef Element Anchor; + using Anchor = Element; } @@ -232,7 +232,7 @@ class Scout::Launcher : public Anchor { public: - typedef Genode::String<64> Name; + using Name = Genode::String<64>; private: diff --git a/repos/demo/src/lib/launchpad/launchpad.cc b/repos/demo/src/lib/launchpad/launchpad.cc index 33d92c7deb..b07a0f9aba 100644 --- a/repos/demo/src/lib/launchpad/launchpad.cc +++ b/repos/demo/src/lib/launchpad/launchpad.cc @@ -99,7 +99,7 @@ void Launchpad::process_config(Genode::Xml_node config_node) */ config_node.for_each_sub_node("launcher", [&] (Xml_node node) { - typedef Launchpad_child::Name Name; + using Name = Launchpad_child::Name; Name *name = new (_heap) Name(node.attribute_value("name", Name())); Number_of_bytes default_ram_quota = @@ -112,7 +112,7 @@ void Launchpad::process_config(Genode::Xml_node config_node) */ Dataspace_capability config_ds; - typedef String<128> Rom_name; + using Rom_name = String<128>; if (node.has_sub_node("configfile")) { diff --git a/repos/demo/src/server/liquid_framebuffer/main.cc b/repos/demo/src/server/liquid_framebuffer/main.cc index 113dbce873..ccfdf0506e 100644 --- a/repos/demo/src/server/liquid_framebuffer/main.cc +++ b/repos/demo/src/server/liquid_framebuffer/main.cc @@ -79,7 +79,7 @@ static long config_fb_y = 260; /** * Window title */ -typedef Genode::String<128> Title; +using Title = Genode::String<128>; static Title config_title { "Liquid Framebuffer" }; /** diff --git a/repos/demo/src/server/liquid_framebuffer/services.cc b/repos/demo/src/server/liquid_framebuffer/services.cc index 71dca7a021..208ee1ff86 100644 --- a/repos/demo/src/server/liquid_framebuffer/services.cc +++ b/repos/demo/src/server/liquid_framebuffer/services.cc @@ -26,7 +26,7 @@ #include "services.h" -typedef Genode::Texture Texture_rgb888; +using Texture_rgb888 = Genode::Texture; class Window_content : public Scout::Element diff --git a/repos/demo/src/server/nitlog/main.cc b/repos/demo/src/server/nitlog/main.cc index 23ddbb2665..d9a0998585 100644 --- a/repos/demo/src/server/nitlog/main.cc +++ b/repos/demo/src/server/nitlog/main.cc @@ -33,11 +33,11 @@ enum { LOG_W = 80 }; /* number of visible characters per line */ enum { LOG_H = 25 }; /* number of lines of log window */ -typedef Text_painter::Font Font; -typedef Genode::Surface_base::Point Point; -typedef Genode::Surface_base::Area Area; -typedef Genode::Surface_base::Rect Rect; -typedef Genode::Color Color; +using Font = Text_painter::Font; +using Point = Genode::Surface_base::Point; +using Area = Genode::Surface_base::Area; +using Rect = Genode::Surface_base::Rect; +using Color = Genode::Color; /* @@ -357,8 +357,8 @@ class Log_view Gui::Area _size; Gui::Session::View_handle _handle; - typedef Gui::Session::Command Command; - typedef Gui::Session::View_handle View_handle; + using Command = Gui::Session::Command; + using View_handle = Gui::Session::View_handle; public: diff --git a/repos/gems/include/ctf/timestamp.h b/repos/gems/include/ctf/timestamp.h index 96bbc7ece7..260782d7da 100644 --- a/repos/gems/include/ctf/timestamp.h +++ b/repos/gems/include/ctf/timestamp.h @@ -32,9 +32,9 @@ namespace Ctf { struct Extension : Bitfield<_PWIDTH, 64-_PWIDTH> { }; }; - typedef _Timestamp Timestamp; + using Timestamp = _Timestamp; - typedef uint64_t __attribute__((aligned(1))) Timestamp_base; + using Timestamp_base = uint64_t __attribute__((aligned(1))); } #endif /* _CTF__TIMESTAMP_H_ */ diff --git a/repos/gems/include/depot/archive.h b/repos/gems/include/depot/archive.h index 79c005da27..c4ef61378b 100644 --- a/repos/gems/include/depot/archive.h +++ b/repos/gems/include/depot/archive.h @@ -25,10 +25,10 @@ namespace Depot { struct Depot::Archive { - typedef String<100> Path; - typedef String<64> User; - typedef String<80> Name; - typedef String<40> Version; + using Path = String<100>; + using User = String<64>; + using Name = String<80>; + using Version = String<40>; enum Type { PKG, RAW, SRC, BIN, DBG, IMAGE }; @@ -78,7 +78,7 @@ struct Depot::Archive */ static Type type(Path const &path) { - typedef String<8> Name; + using Name = String<8>; Name const name = _path_element(path, 1); if (name == "src") return SRC; diff --git a/repos/gems/include/gems/animated_geometry.h b/repos/gems/include/gems/animated_geometry.h index 57940e42b1..380affbcd4 100644 --- a/repos/gems/include/gems/animated_geometry.h +++ b/repos/gems/include/gems/animated_geometry.h @@ -28,9 +28,9 @@ class Genode::Animated_rect : private Animator::Item, Noncopyable struct Steps { unsigned value; }; - typedef Surface_base::Rect Rect; - typedef Surface_base::Area Area; - typedef Surface_base::Point Point; + using Rect = Surface_base::Rect; + using Area = Surface_base::Area; + using Point = Surface_base::Point; private: diff --git a/repos/gems/include/gems/cached_font.h b/repos/gems/include/gems/cached_font.h index 439e822b90..5da7bc930c 100644 --- a/repos/gems/include/gems/cached_font.h +++ b/repos/gems/include/gems/cached_font.h @@ -24,9 +24,9 @@ class Genode::Cached_font : public Text_painter::Font { private: - typedef Text_painter::Area Area; - typedef Text_painter::Font Font; - typedef Text_painter::Glyph Glyph; + using Area = Text_painter::Area; + using Font = Text_painter::Font; + using Glyph = Text_painter::Glyph; struct Cached_glyph : Glyph, Noncopyable { @@ -105,7 +105,7 @@ class Genode::Cached_font : public Text_painter::Font Padding_allocator _padding_alloc; - typedef Lru_cache Cache; + using Cache = Lru_cache; Cache mutable _cache; diff --git a/repos/gems/include/gems/chunky_texture.h b/repos/gems/include/gems/chunky_texture.h index 1006ded505..55be0d957a 100644 --- a/repos/gems/include/gems/chunky_texture.h +++ b/repos/gems/include/gems/chunky_texture.h @@ -23,7 +23,7 @@ class Chunky_texture : Genode::Attached_ram_dataspace, public Genode::Texture Pixel_surface; - typedef Genode::Surface Alpha_surface; - - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Surface_base::Point Point; - - typedef Genode::Attached_ram_dataspace Ram_ds; - - using size_t = Genode::size_t; + using Pixel_rgb888 = Genode::Pixel_rgb888; + using Pixel_alpha8 = Genode::Pixel_alpha8; + using Pixel_surface = Genode::Surface; + using Alpha_surface = Genode::Surface; + using Area = Genode::Surface_base::Area; + using Rect = Genode::Surface_base::Rect; + using Point = Genode::Surface_base::Point; + using Ram_ds = Genode::Attached_ram_dataspace; + using size_t = Genode::size_t; Genode::Ram_allocator &ram; Genode::Region_map &rm; diff --git a/repos/gems/include/gems/ttf_font.h b/repos/gems/include/gems/ttf_font.h index f62ba590a9..bcb82ba83b 100644 --- a/repos/gems/include/gems/ttf_font.h +++ b/repos/gems/include/gems/ttf_font.h @@ -21,12 +21,11 @@ class Ttf_font : public Text_painter::Font { private: - typedef Genode::int32_t int32_t; - typedef Genode::Allocator Allocator; - - typedef Text_painter::Codepoint Codepoint; - typedef Text_painter::Area Area; - typedef Text_painter::Glyph Glyph; + using int32_t = Genode::int32_t; + using Allocator = Genode::Allocator; + using Codepoint = Text_painter::Codepoint; + using Area = Text_painter::Area; + using Glyph = Text_painter::Glyph; struct Stbtt_font_info; diff --git a/repos/gems/include/gems/vfs_font.h b/repos/gems/include/gems/vfs_font.h index 5ee2089df3..52be3c4e65 100644 --- a/repos/gems/include/gems/vfs_font.h +++ b/repos/gems/include/gems/vfs_font.h @@ -24,7 +24,7 @@ class Genode::Vfs_font : public Text_painter::Font { public: - typedef Glyph_painter::Glyph Glyph; + using Glyph = Glyph_painter::Glyph; static constexpr Vfs::file_size GLYPH_SLOT_BYTES = 64*1024; @@ -70,9 +70,9 @@ class Genode::Vfs_font : public Text_painter::Font private: - typedef Text_painter::Codepoint Codepoint; - typedef Text_painter::Area Area; - typedef Directory::Path Path; + using Codepoint = Text_painter::Codepoint; + using Area = Text_painter::Area; + using Path = Directory::Path; Directory const _font_dir; unsigned const _baseline; diff --git a/repos/gems/include/gems/xml_anchor.h b/repos/gems/include/gems/xml_anchor.h index b3b558dbf6..2aed70556a 100644 --- a/repos/gems/include/gems/xml_anchor.h +++ b/repos/gems/include/gems/xml_anchor.h @@ -26,7 +26,7 @@ class Anchor private: - typedef Genode::Xml_node Xml_node; + using Xml_node = Genode::Xml_node; struct Value { diff --git a/repos/gems/include/nano3d/cube_shape.h b/repos/gems/include/nano3d/cube_shape.h index 60a15ee8f0..bcedc7d998 100644 --- a/repos/gems/include/nano3d/cube_shape.h +++ b/repos/gems/include/nano3d/cube_shape.h @@ -25,13 +25,13 @@ class Nano3d::Cube_shape enum { NUM_VERTICES = 8, NUM_FACES = 6 }; - typedef Nano3d::Vertex_array Vertex_array; + using Vertex_array = Nano3d::Vertex_array; Vertex_array _vertices { }; enum { VERTICES_PER_FACE = 4 }; - typedef unsigned Face[VERTICES_PER_FACE]; + using Face = unsigned[VERTICES_PER_FACE]; Face _faces[NUM_FACES] { { 0, 1, 3, 2 }, { 6, 7, 5, 4 }, diff --git a/repos/gems/include/nano3d/dodecahedron_shape.h b/repos/gems/include/nano3d/dodecahedron_shape.h index a90732eff3..20cd4d2315 100644 --- a/repos/gems/include/nano3d/dodecahedron_shape.h +++ b/repos/gems/include/nano3d/dodecahedron_shape.h @@ -66,7 +66,7 @@ class Nano3d::Dodecahedron_shape int edge(unsigned i) const { return _edges[i]; } }; - typedef Nano3d::Vertex_array Vertex_array; + using Vertex_array = Nano3d::Vertex_array; Vertex_array _vertices { }; diff --git a/repos/gems/include/nano3d/scene.h b/repos/gems/include/nano3d/scene.h index 92e2dd0c41..f40dd05a5d 100644 --- a/repos/gems/include/nano3d/scene.h +++ b/repos/gems/include/nano3d/scene.h @@ -48,7 +48,7 @@ class Nano3d::Scene class Unsupported_color_depth { }; - typedef Genode::Pixel_alpha8 Pixel_alpha8; + using Pixel_alpha8 = Genode::Pixel_alpha8; virtual void render(Genode::Surface &pixel_surface, Genode::Surface &alpha_surface) = 0; @@ -146,8 +146,8 @@ class Nano3d::Scene Gui::Session::View_handle _view_handle = _gui.create_view(); - typedef Genode::Surface Pixel_surface; - typedef Genode::Surface Alpha_surface; + using Pixel_surface = Genode::Surface; + using Alpha_surface = Genode::Surface; struct Surface { @@ -270,7 +270,7 @@ class Nano3d::Scene Genode::Signal_handler _sync_handler { _env.ep(), *this, &Scene::_handle_sync }; - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; public: @@ -279,7 +279,7 @@ class Nano3d::Scene : _env(env), _pos(pos), _size(size) { - typedef Gui::Session::View_handle View_handle; + using View_handle = Gui::Session::View_handle; Gui::Rect rect(_pos, _size); _gui.enqueue(_view_handle, rect); diff --git a/repos/gems/include/nano3d/vertex_array.h b/repos/gems/include/nano3d/vertex_array.h index 9ce7443e49..90aaa021e5 100644 --- a/repos/gems/include/nano3d/vertex_array.h +++ b/repos/gems/include/nano3d/vertex_array.h @@ -21,7 +21,7 @@ namespace Nano3d { template class Vec2; template class Vec3; - typedef Vec3 Vertex; + using Vertex = Vec3; template class Vertex_array; } diff --git a/repos/gems/include/polygon_gfx/clipping.h b/repos/gems/include/polygon_gfx/clipping.h index 0a035503f8..a408f914c7 100644 --- a/repos/gems/include/polygon_gfx/clipping.h +++ b/repos/gems/include/polygon_gfx/clipping.h @@ -207,10 +207,10 @@ struct Polygon::Clipper : CLIPPER_DIRECTION, CLIPPER_MINMAX template struct Polygon::Clipper_2d { - typedef Clipper, Clipper_min, POINT> Top; - typedef Clipper, Clipper_max, POINT> Bottom; - typedef Clipper, Clipper_min, POINT> Left; - typedef Clipper, Clipper_max, POINT> Right; + using Top = Clipper, Clipper_min, POINT>; + using Bottom = Clipper, Clipper_max, POINT>; + using Left = Clipper, Clipper_min, POINT>; + using Right = Clipper, Clipper_max, POINT>; }; #endif /* _INCLUDE__POLYGON_GFX__CLIPPING_H_ */ diff --git a/repos/gems/include/polygon_gfx/line_painter.h b/repos/gems/include/polygon_gfx/line_painter.h index dddec0e936..d5998a2c28 100644 --- a/repos/gems/include/polygon_gfx/line_painter.h +++ b/repos/gems/include/polygon_gfx/line_painter.h @@ -20,8 +20,8 @@ struct Line_painter { - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Surface_base::Point Point; + using Rect = Genode::Surface_base::Rect; + using Point = Genode::Surface_base::Point; /** * Fixpoint number with 8 fractional bits diff --git a/repos/gems/include/polygon_gfx/polygon_painter_base.h b/repos/gems/include/polygon_gfx/polygon_painter_base.h index ac771d6191..9bea4f7469 100644 --- a/repos/gems/include/polygon_gfx/polygon_painter_base.h +++ b/repos/gems/include/polygon_gfx/polygon_painter_base.h @@ -91,8 +91,8 @@ class Polygon::Painter_base public: - typedef Genode::Rect<> Rect; - typedef Genode::Area<> Area; + using Rect = Genode::Rect<>; + using Area = Genode::Area<>; /** * Buffers used for storing interpolated attribute values along a left @@ -191,7 +191,7 @@ class Polygon::Painter_base c0[num_points] = c0[0]; /* clip against top, left, bottom, and right clipping boundaries */ - typedef Clipper_2d Clipper; + using Clipper = Clipper_2d; num_points = _clip_1d (c0, num_points, c1, clip.y1()); num_points = _clip_1d (c1, num_points, c0, clip.x1()); num_points = _clip_1d(c0, num_points, c1, clip.y2()); diff --git a/repos/gems/src/app/backdrop/main.cc b/repos/gems/src/app/backdrop/main.cc index 4ded5d1767..25cd0fd144 100644 --- a/repos/gems/src/app/backdrop/main.cc +++ b/repos/gems/src/app/backdrop/main.cc @@ -115,8 +115,8 @@ struct Backdrop::Main void _update_view() { /* display view behind all others */ - typedef Gui::Session::Command Command; - typedef Gui::Session::View_handle View_handle; + using Command = Gui::Session::Command; + using View_handle = Gui::Session::View_handle; _gui.enqueue(_view_handle); Gui::Rect rect(Gui::Point(), _buffer->size()); @@ -227,15 +227,15 @@ void Backdrop::Main::_paint_texture(Surface &surface, Texture const &tex void Backdrop::Main::_apply_image(Xml_node operation) { - typedef Surface_base::Point Point; - typedef Surface_base::Area Area; + using Point = Surface_base::Point; + using Area = Surface_base::Area; if (!operation.has_attribute("png")) { Genode::warning("missing 'png' attribute in node"); return; } - typedef String<256> File_name; + using File_name = String<256>; File_name const png_file_name = operation.attribute_value("png", File_name()); File file(png_file_name.string(), _heap); @@ -284,7 +284,7 @@ void Backdrop::Main::_apply_image(Xml_node operation) */ /* create texture with down-sampled scaled image */ - typedef Pixel_rgb888 PT; + using PT = Pixel_rgb888; Chunky_texture texture(_env.ram(), _env.rm(), scaled_size); convert_pixel_format(scaled_texture, texture, alpha, _heap); @@ -302,7 +302,7 @@ void Backdrop::Main::_apply_fill(Xml_node operation) */ /* create texture with down-sampled scaled image */ - typedef Pixel_rgb888 PT; + using PT = Pixel_rgb888; Color const color = operation.attribute_value("color", Color::black()); diff --git a/repos/gems/src/app/decorator/canvas.h b/repos/gems/src/app/decorator/canvas.h index a2a81c6f95..aa746eaaf3 100644 --- a/repos/gems/src/app/decorator/canvas.h +++ b/repos/gems/src/app/decorator/canvas.h @@ -24,7 +24,7 @@ namespace Decorator { - typedef Text_painter::Font Font; + using Font = Text_painter::Font; Font &default_font(); enum Texture_id { diff --git a/repos/gems/src/app/decorator/config.h b/repos/gems/src/app/decorator/config.h index 311ac1bc18..29e9428788 100644 --- a/repos/gems/src/app/decorator/config.h +++ b/repos/gems/src/app/decorator/config.h @@ -26,7 +26,7 @@ namespace Decorator { class Config; - typedef Genode::String<200> Window_title; + using Window_title = Genode::String<200>; using Genode::Allocator; using Genode::Reconstructible; diff --git a/repos/gems/src/app/decorator/window.h b/repos/gems/src/app/decorator/window.h index c6abbe8e33..b233fc14d0 100644 --- a/repos/gems/src/app/decorator/window.h +++ b/repos/gems/src/app/decorator/window.h @@ -43,7 +43,7 @@ class Decorator::Window : public Window_base View_handle _handle { _gui.create_view() }; - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; Gui_view(Gui::Session_client &gui, unsigned id = 0) : @@ -124,7 +124,7 @@ class Decorator::Window : public Window_base */ Lazy_value _gradient_percent = _config.gradient_percent(_title); - typedef Window_element Element; + using Element = Window_element; /* * The element order must correspond to the order of enum values @@ -162,7 +162,7 @@ class Decorator::Window : public Window_base return element(type).apply_state(state); } - typedef Config::Window_control Control; + using Control = Config::Window_control; class Controls { diff --git a/repos/gems/src/app/depot_autopilot/child.cc b/repos/gems/src/app/depot_autopilot/child.cc index 7dbe6201be..838174a1c6 100644 --- a/repos/gems/src/app/depot_autopilot/child.cc +++ b/repos/gems/src/app/depot_autopilot/child.cc @@ -278,7 +278,7 @@ void Child::gen_start_node(Xml_generator &xml, xml.attribute("caps", caps); - typedef String<64> Version; + using Version = String<64>; Version const version = _start_xml->xml().attribute_value("version", Version()); if (version.valid()) xml.attribute("version", version); @@ -423,7 +423,7 @@ void Child::_gen_routes(Xml_generator &xml, if (!_pkg_xml.constructed()) return; - typedef String<160> Path; + using Path = String<160>; /* * Add routes given in the start node. @@ -474,7 +474,7 @@ void Child::_gen_routes(Xml_generator &xml, xml.node("service", [&] () { xml.attribute("name", "ROM"); xml.attribute("label", "config"); - typedef String<160> Path; + using Path = String<160>; Path const path = rom.attribute_value("path", Path()); if (cached_depot_rom.valid()) @@ -503,7 +503,7 @@ void Child::_gen_routes(Xml_generator &xml, if (!rom.has_attribute("path")) return; - typedef Name Label; + using Label = Name; Path const path = rom.attribute_value("path", Path()); Label const label = rom.attribute_value("label", Label()); diff --git a/repos/gems/src/app/depot_autopilot/child.h b/repos/gems/src/app/depot_autopilot/child.h index 4ca1a6282f..501a4a481a 100644 --- a/repos/gems/src/app/depot_autopilot/child.h +++ b/repos/gems/src/app/depot_autopilot/child.h @@ -240,13 +240,13 @@ class Depot_deploy::Child : public List_model::Element { public: - typedef String<100> Name; - typedef String<80> Binary_name; - typedef String<80> Config_name; - typedef String<32> Depot_rom_server; - typedef String<16> State_name; - typedef String<100> Launcher_name; - typedef String<128> Conclusion; + using Name = String<100>; + using Binary_name = String<80>; + using Config_name = String<80>; + using Depot_rom_server = String<32>; + using State_name = String<16>; + using Launcher_name = String<100>; + using Conclusion = String<128>; private: diff --git a/repos/gems/src/app/depot_autopilot/main.cc b/repos/gems/src/app/depot_autopilot/main.cc index 9b0faf15c3..8314d8277c 100644 --- a/repos/gems/src/app/depot_autopilot/main.cc +++ b/repos/gems/src/app/depot_autopilot/main.cc @@ -133,7 +133,7 @@ struct Depot_deploy::Main _children.apply_blueprint(_blueprint.xml()); /* determine CPU architecture of deployment */ - typedef String<16> Arch; + using Arch = String<16>; Arch const arch = config.attribute_value("arch", Arch()); if (!arch.valid()) warning("config lacks 'arch' attribute"); @@ -167,7 +167,7 @@ struct Depot_deploy::Main _children.conclusion(result); int exit_code = result.failed ? -1 : 0; - typedef String<12> Repeat; + using Repeat = String<12>; Repeat repeat = config.attribute_value("repeat", Repeat("false")); if (repeat == Repeat("until_forever") || (repeat == Repeat("until_failed") && exit_code == 0)) { diff --git a/repos/gems/src/app/depot_deploy/child.h b/repos/gems/src/app/depot_deploy/child.h index 65664f11ab..96b2a68af0 100644 --- a/repos/gems/src/app/depot_deploy/child.h +++ b/repos/gems/src/app/depot_deploy/child.h @@ -31,11 +31,11 @@ class Depot_deploy::Child : public List_model::Element { public: - typedef String<100> Name; - typedef String<80> Binary_name; - typedef String<80> Config_name; - typedef String<32> Depot_rom_server; - typedef String<100> Launcher_name; + using Name = String<100>; + using Binary_name = String<80>; + using Config_name = String<80>; + using Depot_rom_server = String<32>; + using Launcher_name = String<100>; struct Prio_levels { @@ -426,7 +426,7 @@ void Depot_deploy::Child::gen_start_node(Xml_generator &xml, } { - typedef String<64> Version; + using Version = String<64>; Version const version = _start_xml->xml().attribute_value("version", Version()); if (version.valid()) xml.attribute("version", version); @@ -631,7 +631,7 @@ void Depot_deploy::Child::_gen_routes(Xml_generator &xml, Xml_node common, if (!_pkg_xml.constructed()) return; - typedef String<160> Path; + using Path = String<160>; /* * Add routes given in the start node. @@ -710,7 +710,7 @@ void Depot_deploy::Child::_gen_routes(Xml_generator &xml, Xml_node common, xml.node("service", [&] { xml.attribute("name", "ROM"); xml.attribute("label", "config"); - typedef String<160> Path; + using Path = String<160>; Path const path = rom.attribute_value("path", Path()); if (cached_depot_rom.valid()) @@ -739,7 +739,7 @@ void Depot_deploy::Child::_gen_routes(Xml_generator &xml, Xml_node common, if (!rom.has_attribute("path")) return; - typedef Name Label; + using Label = Name; Path const path = rom.attribute_value("path", Path()); Label const label = rom.attribute_value("label", Label()); Label const as = rom.attribute_value("as", label); diff --git a/repos/gems/src/app/depot_download_manager/gen_depot_query.cc b/repos/gems/src/app/depot_download_manager/gen_depot_query.cc index 98fc3bc5f5..1bdccafa5c 100644 --- a/repos/gems/src/app/depot_download_manager/gen_depot_query.cc +++ b/repos/gems/src/app/depot_download_manager/gen_depot_query.cc @@ -24,7 +24,7 @@ void Depot_download_manager::gen_depot_query_start_content(Xml_generator &xml, xml.node("config", [&] () { xml.attribute("version", version.value); - typedef String<32> Arch; + using Arch = String<32>; xml.attribute("arch", installation.attribute_value("arch", Arch())); xml.node("vfs", [&] () { xml.node("dir", [&] () { diff --git a/repos/gems/src/app/depot_download_manager/gen_extract.cc b/repos/gems/src/app/depot_download_manager/gen_extract.cc index 53be0ea29f..856b1534a9 100644 --- a/repos/gems/src/app/depot_download_manager/gen_extract.cc +++ b/repos/gems/src/app/depot_download_manager/gen_extract.cc @@ -57,7 +57,7 @@ void Depot_download_manager::gen_extract_start_content(Xml_generator &xml, import.for_each_verified_or_blessed_archive([&] (Archive::Path const &path) { - typedef String<160> Path; + using Path = String<160>; xml.node("extract", [&] () { xml.attribute("archive", Path("/public/", Archive::download_file_path(path))); diff --git a/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc b/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc index e185f8cf5e..b028956746 100644 --- a/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc +++ b/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc @@ -68,9 +68,9 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml, }); import.for_each_download([&] (Archive::Path const &path) { - typedef String<160> Remote; - typedef String<160> Local; - typedef String<100> File_path; + using Remote = String<160>; + using Local = String<160>; + using File_path = String<100>; File_path const file_path = Archive::download_file_path(path); Remote const remote (current_user_url, "/", file_path); diff --git a/repos/gems/src/app/depot_download_manager/gen_verify.cc b/repos/gems/src/app/depot_download_manager/gen_verify.cc index a0bc66844d..2762edd46a 100644 --- a/repos/gems/src/app/depot_download_manager/gen_verify.cc +++ b/repos/gems/src/app/depot_download_manager/gen_verify.cc @@ -51,7 +51,7 @@ void Depot_download_manager::gen_verify_start_content(Xml_generator &xml, import.for_each_unverified_archive([&] (Archive::Path const &path) { - typedef String<160> Path; + using Path = String<160>; Path const file_path ("/public/", Archive::download_file_path(path)); Path const pubkey_path (user_path, "/pubkey"); diff --git a/repos/gems/src/app/depot_download_manager/main.cc b/repos/gems/src/app/depot_download_manager/main.cc index 6218eeb028..1493093c30 100644 --- a/repos/gems/src/app/depot_download_manager/main.cc +++ b/repos/gems/src/app/depot_download_manager/main.cc @@ -34,7 +34,7 @@ struct Depot_download_manager::Child_exit_state bool exited = false; int code = 0; - typedef String<64> Name; + using Name = String<64>; Child_exit_state(Xml_node init_state, Name const &name) { diff --git a/repos/gems/src/app/depot_download_manager/types.h b/repos/gems/src/app/depot_download_manager/types.h index 58f73ab232..0a1320d179 100644 --- a/repos/gems/src/app/depot_download_manager/types.h +++ b/repos/gems/src/app/depot_download_manager/types.h @@ -22,9 +22,9 @@ namespace Depot_download_manager { using namespace Depot; - typedef String<32> Rom_name; - typedef String<160> Url; - typedef String<160> Path; + using Rom_name = String<32>; + using Url = String<160>; + using Path = String<160>; struct Depot_query_version { unsigned value; }; struct Fetchurl_version { unsigned value; }; diff --git a/repos/gems/src/app/depot_query/main.cc b/repos/gems/src/app/depot_query/main.cc index f6273a6e74..bb68691634 100644 --- a/repos/gems/src/app/depot_query/main.cc +++ b/repos/gems/src/app/depot_query/main.cc @@ -215,7 +215,7 @@ void Depot_query::Main::_collect_source_dependencies(Archive::Path const &path, } case Archive::SRC: { - typedef String<160> Api; + using Api = String<160>; _with_file_content(path, "used_apis", [&] (File_content const &used_apis) { used_apis.for_each_line([&] (Api const &api) { dependencies.record(Archive::Path(Archive::user(path), "/api/", api), @@ -303,13 +303,13 @@ void Depot_query::Main::_query_user(Archive::User const &user, Xml_generator &xm Directory user_dir(_root, Directory::Path("depot/", user)); File_content download(_heap, user_dir, "download", File_content::Limit{4*1024}); - typedef String<256> Url; + using Url = String<256>; download.for_each_line([&] (Url const &url) { xml.node("url", [&] () { xml.append_sanitized(url.string()); }); }); File_content pubkey(_heap, user_dir, "pubkey", File_content::Limit{8*1024}); xml.node("pubkey", [&] () { - typedef String<80> Line; + using Line = String<80>; pubkey.for_each_line([&] (Line const &line) { xml.append_sanitized(line.string()); xml.append("\n"); diff --git a/repos/gems/src/app/depot_query/main.h b/repos/gems/src/app/depot_query/main.h index 603b1fb0da..bc980827bf 100644 --- a/repos/gems/src/app/depot_query/main.h +++ b/repos/gems/src/app/depot_query/main.h @@ -30,7 +30,7 @@ namespace Depot_query { using namespace Depot; - typedef String<64> Rom_label; + using Rom_label = String<64>; struct Require_verify; struct Directory_cache; @@ -298,7 +298,7 @@ struct Depot_query::Main Signal_handler
_query_handler { _env.ep(), *this, &Main::_handle_config }; - typedef Constructible Constructible_reporter; + using Constructible_reporter = Constructible; Constructible_reporter _scan_reporter { }; Constructible_reporter _blueprint_reporter { }; @@ -318,8 +318,8 @@ struct Depot_query::Main obj.destruct(); } - typedef String<16> Architecture; - typedef String<32> Version; + using Architecture = String<16>; + using Version = String<32>; Architecture _architecture { }; diff --git a/repos/gems/src/app/fs_tool/main.cc b/repos/gems/src/app/fs_tool/main.cc index 2bc05b4c56..88caa840ab 100644 --- a/repos/gems/src/app/fs_tool/main.cc +++ b/repos/gems/src/app/fs_tool/main.cc @@ -56,7 +56,7 @@ struct Fs_tool::Main bool _verbose = false; - typedef Directory::Path Path; + using Path = Directory::Path; void _copy_file(Path const &from, Path const &to, Byte_range_ptr const &); diff --git a/repos/gems/src/app/menu_view/cursor.h b/repos/gems/src/app/menu_view/cursor.h index fef59be82c..9b0c8b5dde 100644 --- a/repos/gems/src/app/menu_view/cursor.h +++ b/repos/gems/src/app/menu_view/cursor.h @@ -49,7 +49,7 @@ class Menu_view::Cursor : List_model::Element Glyph_position &_glyph_position; enum { NAME_MAX_LEN = 32 }; - typedef String Name; + using Name = String; Name const _name; diff --git a/repos/gems/src/app/menu_view/depgraph_widget.h b/repos/gems/src/app/menu_view/depgraph_widget.h index af2402a7fd..1a55be22e1 100644 --- a/repos/gems/src/app/menu_view/depgraph_widget.h +++ b/repos/gems/src/app/menu_view/depgraph_widget.h @@ -420,8 +420,8 @@ struct Menu_view::Depgraph_widget : Widget } }; - typedef Registered Registered_node; - typedef Registry Node_registry; + using Registered_node = Registered; + using Node_registry = Registry; Node_registry _nodes { }; @@ -453,7 +453,7 @@ struct Menu_view::Depgraph_widget : Widget { /* update depth direction */ { - typedef String<10> Dir_name; + using Dir_name = String<10>; Dir_name dir_name = node.attribute_value("direction", Dir_name()); _depth_direction = { Depth_direction::EAST }; if (dir_name == "north") _depth_direction = { Depth_direction::NORTH }; @@ -516,7 +516,7 @@ struct Menu_view::Depgraph_widget : Widget bool const primary = !node.has_type("dep"); - typedef String<64> Node_name; + using Node_name = String<64>; Node_name client_name, server_name; bool dep_visible = true; if (primary) { diff --git a/repos/gems/src/app/menu_view/label_widget.h b/repos/gems/src/app/menu_view/label_widget.h index ca9ecfcb01..b640ec5d01 100644 --- a/repos/gems/src/app/menu_view/label_widget.h +++ b/repos/gems/src/app/menu_view/label_widget.h @@ -27,7 +27,7 @@ struct Menu_view::Label_widget : Widget, Cursor::Glyph_position enum { LABEL_MAX_LEN = 256 }; - typedef String<200> Text; + using Text = String<200>; Text _text { }; Animated_color _color; diff --git a/repos/gems/src/app/menu_view/style_database.h b/repos/gems/src/app/menu_view/style_database.h index 4c3f7e5363..c6ff6b9c2a 100644 --- a/repos/gems/src/app/menu_view/style_database.h +++ b/repos/gems/src/app/menu_view/style_database.h @@ -56,9 +56,9 @@ class Menu_view::Style_database */ bool mutable _out_of_date = false; - typedef String Path; + using Path = String; - typedef ::File::Reading_failed Reading_failed; + using Reading_failed = ::File::Reading_failed; struct Label_style_entry : List::Element, Noncopyable { @@ -198,7 +198,7 @@ class Menu_view::Style_database */ static Path _construct_png_path(Xml_node node, char const *name) { - typedef String<64> Style; + using Style = String<64>; Style const style = node.attribute_value("style", Style("default")); return Path(node.type(), "/", style, "/", name, ".png"); @@ -209,7 +209,7 @@ class Menu_view::Style_database */ static Path _widget_style_path(Xml_node const &node) { - typedef String<64> Style; + using Style = String<64>; Style const style = node.attribute_value("style", Style("default")); return Path(node.type(), "/", style, "/", "style"); diff --git a/repos/gems/src/app/menu_view/text_selection.h b/repos/gems/src/app/menu_view/text_selection.h index b866a4ffa9..807052d28c 100644 --- a/repos/gems/src/app/menu_view/text_selection.h +++ b/repos/gems/src/app/menu_view/text_selection.h @@ -39,7 +39,7 @@ class Menu_view::Text_selection : List_model::Element Glyph_position &_glyph_position; enum { NAME_MAX_LEN = 32 }; - typedef String Name; + using Name = String; Name const _name; diff --git a/repos/gems/src/app/menu_view/widget.h b/repos/gems/src/app/menu_view/widget.h index cc843480ac..2c2fa64a0d 100644 --- a/repos/gems/src/app/menu_view/widget.h +++ b/repos/gems/src/app/menu_view/widget.h @@ -27,7 +27,7 @@ namespace Menu_view { struct Margin; struct Widget; - typedef Margin Padding; + using Padding = Margin; } diff --git a/repos/gems/src/app/mixer_gui_qt/main_window.cpp b/repos/gems/src/app/mixer_gui_qt/main_window.cpp index 7b99627d01..f4b16e3ab5 100644 --- a/repos/gems/src/app/mixer_gui_qt/main_window.cpp +++ b/repos/gems/src/app/mixer_gui_qt/main_window.cpp @@ -35,7 +35,7 @@ ** helper ** ************/ -typedef Mixer::Channel Channel; +using Channel = Mixer::Channel; static struct Names { char const *name; diff --git a/repos/gems/src/app/nano3d/main.cc b/repos/gems/src/app/nano3d/main.cc index d67e48cc77..b35213092b 100644 --- a/repos/gems/src/app/nano3d/main.cc +++ b/repos/gems/src/app/nano3d/main.cc @@ -126,7 +126,7 @@ class Scene : public Nano3d::Scene SHAPE const &shape, unsigned frame, bool backward_facing) { - typedef Genode::Color Color; + using Color = Genode::Color; auto vertices = shape.vertex_array(); @@ -138,7 +138,7 @@ class Scene : public Nano3d::Scene if (_painter == PAINTER_TEXTURED) { - typedef Polygon::Textured_painter::Point Textured_point; + using Textured_point = Polygon::Textured_painter::Point; shape.for_each_face([&] (unsigned const vertex_indices[], unsigned num_vertices) { @@ -171,7 +171,7 @@ class Scene : public Nano3d::Scene if (_painter == PAINTER_SHADED) { - typedef Polygon::Shaded_painter::Point Shaded_point; + using Shaded_point = Polygon::Shaded_painter::Point; shape.for_each_face([&] (unsigned const vertex_indices[], unsigned num_vertices) { diff --git a/repos/gems/src/app/sculpt_manager/deploy.cc b/repos/gems/src/app/sculpt_manager/deploy.cc index 28efe6570f..07143cb55c 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.cc +++ b/repos/gems/src/app/sculpt_manager/deploy.cc @@ -38,8 +38,8 @@ void Sculpt::Deploy::view_diag(Scope<> &s) const /* * Collect messages in registry, avoiding duplicates */ - typedef String<64> Message; - typedef Registered_no_delete Registered_message; + using Message = String<64>; + using Registered_message = Registered_no_delete; Registry messages { }; auto gen_missing_dependencies = [&] (Xml_node start, Start_name const &name) @@ -112,7 +112,7 @@ void Sculpt::Deploy::_handle_managed_deploy(Xml_node const &managed_deploy) if (file.attribute_value("xml", false) == false) return; - typedef Depot_deploy::Child::Launcher_name Name; + using Name = Depot_deploy::Child::Launcher_name; Name const name = file.attribute_value("name", Name()); file.for_each_sub_node("launcher", [&] (Xml_node const &launcher) { diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h index e64c354766..2db79f9e49 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.h +++ b/repos/gems/src/app/sculpt_manager/deploy.h @@ -35,7 +35,7 @@ namespace Sculpt { struct Deploy; } struct Sculpt::Deploy { - typedef Depot_deploy::Child::Prio_levels Prio_levels; + using Prio_levels = Depot_deploy::Child::Prio_levels; Env &_env; @@ -58,7 +58,7 @@ struct Sculpt::Deploy Download_queue &_download_queue; - typedef String<16> Arch; + using Arch = String<16>; Arch _arch { }; Child_state cached_depot_rom_state { diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 0099e6ef1b..1530ca0217 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -1702,7 +1702,7 @@ void Sculpt::Main::_update_window_layout(Xml_node const &decorator_margins, unsigned const log_min_w = 400; - typedef String<128> Label; + using Label = String<128>; Label const inspect_label ("runtime -> leitzentrale -> inspect"), runtime_view_label ("runtime -> leitzentrale -> runtime_dialog"), diff --git a/repos/gems/src/app/sculpt_manager/model/access_point.h b/repos/gems/src/app/sculpt_manager/model/access_point.h index cd0a8f7700..af2d318fbe 100644 --- a/repos/gems/src/app/sculpt_manager/model/access_point.h +++ b/repos/gems/src/app/sculpt_manager/model/access_point.h @@ -21,14 +21,14 @@ namespace Sculpt { struct Access_point; struct Access_point_update_policy; - typedef List_model Access_points; + using Access_points = List_model; }; struct Sculpt::Access_point : List_model::Element { - typedef String<32> Bssid; - typedef String<32> Ssid; + using Bssid = String<32>; + using Ssid = String<32>; enum Protection { UNKNOWN, UNPROTECTED, WPA_PSK }; diff --git a/repos/gems/src/app/sculpt_manager/model/capacity.h b/repos/gems/src/app/sculpt_manager/model/capacity.h index c50d48d829..fce1254437 100644 --- a/repos/gems/src/app/sculpt_manager/model/capacity.h +++ b/repos/gems/src/app/sculpt_manager/model/capacity.h @@ -25,7 +25,7 @@ struct Sculpt::Capacity void print(Output &out) const { uint64_t const KB = 1024, MB = 1024*KB, GB = 1024*MB; - typedef String<64> Text; + using Text = String<64>; Text const text = (value > GB) ? Text((float)value/GB, " GiB") : (value > MB) ? Text((float)value/MB, " MiB") : (value > KB) ? Text((float)value/KB, " KiB") diff --git a/repos/gems/src/app/sculpt_manager/model/child_exit_state.h b/repos/gems/src/app/sculpt_manager/model/child_exit_state.h index 9768462220..de6552e1d0 100644 --- a/repos/gems/src/app/sculpt_manager/model/child_exit_state.h +++ b/repos/gems/src/app/sculpt_manager/model/child_exit_state.h @@ -29,8 +29,8 @@ struct Sculpt::Child_exit_state bool responsive = true; int code = 0; - typedef String<64> Name; - typedef String<16> Version; + using Name = String<64>; + using Version = String<16>; Version version { }; diff --git a/repos/gems/src/app/sculpt_manager/model/component.h b/repos/gems/src/app/sculpt_manager/model/component.h index cb49621a0f..bc76b5f469 100644 --- a/repos/gems/src/app/sculpt_manager/model/component.h +++ b/repos/gems/src/app/sculpt_manager/model/component.h @@ -24,10 +24,10 @@ namespace Sculpt { struct Component; } struct Sculpt::Component : Noncopyable { - typedef Depot::Archive::Path Path; - typedef Depot::Archive::Name Name; - typedef String<100> Info; - typedef Start_name Service; + using Path = Depot::Archive::Path; + using Name = Depot::Archive::Name; + using Info = String<100>; + using Service = Start_name; Allocator &_alloc; diff --git a/repos/gems/src/app/sculpt_manager/model/download_queue.h b/repos/gems/src/app/sculpt_manager/model/download_queue.h index 975528eac8..297984ba17 100644 --- a/repos/gems/src/app/sculpt_manager/model/download_queue.h +++ b/repos/gems/src/app/sculpt_manager/model/download_queue.h @@ -126,7 +126,7 @@ struct Sculpt::Download_queue : Noncopyable if (download.path != path) return; - typedef String<16> State; + using State = String<16>; State const state = elem.attribute_value("state", State()); download.percent = percent; diff --git a/repos/gems/src/app/sculpt_manager/model/nic_state.h b/repos/gems/src/app/sculpt_manager/model/nic_state.h index 850976d4f4..38abd2c3ca 100644 --- a/repos/gems/src/app/sculpt_manager/model/nic_state.h +++ b/repos/gems/src/app/sculpt_manager/model/nic_state.h @@ -21,7 +21,7 @@ namespace Sculpt { struct Nic_state; } struct Sculpt::Nic_state { - typedef String<32> Ipv4; + using Ipv4 = String<32>; Ipv4 ipv4; diff --git a/repos/gems/src/app/sculpt_manager/model/partition.h b/repos/gems/src/app/sculpt_manager/model/partition.h index 82c91008ae..f5121bbdb6 100644 --- a/repos/gems/src/app/sculpt_manager/model/partition.h +++ b/repos/gems/src/app/sculpt_manager/model/partition.h @@ -23,7 +23,7 @@ namespace Sculpt { struct Partition; struct Partition_update_policy; - typedef List_model Partitions; + using Partitions = List_model; }; @@ -43,8 +43,8 @@ struct Sculpt::File_system struct Sculpt::Partition : List_model::Element { - typedef String<16> Number; - typedef String<32> Label; + using Number = String<16>; + using Label = String<32>; enum Expandable { FIXED_SIZE, EXPANDABLE }; diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_config.h b/repos/gems/src/app/sculpt_manager/model/runtime_config.h index d32e9c8927..8f8fc915b2 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_config.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_config.h @@ -298,8 +298,8 @@ class Sculpt::Runtime_config struct Parent_services { - typedef Registered_no_delete Parent_service; - typedef Service::Type Type; + using Parent_service = Registered_no_delete; + using Type = Service::Type; Registry _r { }; diff --git a/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h b/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h index 3b2c9c9aed..6643a91c44 100644 --- a/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h +++ b/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h @@ -21,7 +21,7 @@ namespace Sculpt { struct Usb_storage_device; struct Usb_storage_device_update_policy; - typedef List_model Usb_storage_devices; + using Usb_storage_devices = List_model; }; @@ -33,8 +33,8 @@ struct Sculpt::Usb_storage_device : List_model::Element, */ struct Driver_info { - typedef String<28> Vendor; - typedef String<48> Product; + using Vendor = String<28>; + using Product = String<48>; Vendor const vendor; Product const product; diff --git a/repos/gems/src/app/sculpt_manager/runtime/update.cc b/repos/gems/src/app/sculpt_manager/runtime/update.cc index 1cbba13d1b..98b8947599 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/update.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/update.cc @@ -23,7 +23,7 @@ void Sculpt::gen_update_start_content(Xml_generator &xml) xml.node("route", [&] { - typedef String<32> Label; + using Label = String<32>; auto gen_fs = [&] (Label const &label, Label const &server) { gen_service_node<::File_system::Session>(xml, [&] { xml.attribute("label", label); diff --git a/repos/gems/src/app/sculpt_manager/types.h b/repos/gems/src/app/sculpt_manager/types.h index 4df39205e5..44defc155b 100644 --- a/repos/gems/src/app/sculpt_manager/types.h +++ b/repos/gems/src/app/sculpt_manager/types.h @@ -40,13 +40,13 @@ namespace Sculpt { using namespace Genode; - typedef String<64> Rom_name; - typedef String<128> Path; - typedef String<36> Start_name; + using Rom_name = String<64>; + using Path = String<128>; + using Start_name = String<36>; - typedef Gui::Point Point; - typedef Gui::Rect Rect; - typedef Gui::Area Area; + using Point = Gui::Point; + using Rect = Gui::Rect; + using Area = Gui::Area; enum Writeable { WRITEABLE, READ_ONLY }; diff --git a/repos/gems/src/app/text_area/main.cc b/repos/gems/src/app/text_area/main.cc index ca9c13e077..10994b3655 100644 --- a/repos/gems/src/app/text_area/main.cc +++ b/repos/gems/src/app/text_area/main.cc @@ -147,7 +147,7 @@ struct Text_area::Main : Text_area_widget::Action File_content content(_heap, _vfs, _path(), File_content::Limit{1024*1024}); enum { MAX_LINE_LEN = 1000 }; - typedef String Content_line; + using Content_line = String; _dialog.text.clear(); content.for_each_line([&] (Content_line const &line) { diff --git a/repos/gems/src/app/themed_decorator/config.h b/repos/gems/src/app/themed_decorator/config.h index 543b8a33ed..8c69e0511e 100644 --- a/repos/gems/src/app/themed_decorator/config.h +++ b/repos/gems/src/app/themed_decorator/config.h @@ -25,7 +25,7 @@ namespace Decorator { class Config; - typedef Genode::String<200> Window_title; + using Window_title = Genode::String<200>; } diff --git a/repos/gems/src/app/themed_decorator/theme.cc b/repos/gems/src/app/themed_decorator/theme.cc index c2313fc2de..3570c4efbd 100644 --- a/repos/gems/src/app/themed_decorator/theme.cc +++ b/repos/gems/src/app/themed_decorator/theme.cc @@ -33,7 +33,7 @@ enum Texture_id { TEXTURE_ID_DEFAULT, TEXTURE_ID_CLOSER, TEXTURE_ID_MAXIMIZER }; struct Texture_from_png_file { - typedef Genode::Texture Texture; + using Texture = Genode::Texture; File png_file; Png_image png_image; @@ -202,8 +202,8 @@ void Decorator::Theme::draw_background(Decorator::Pixel_surface &pixel_surface, Genode::Texture const &texture = texture_by_id(_ram, _rm, _alloc, TEXTURE_ID_DEFAULT); - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; unsigned const left = aura_margins().left + decor_margins().left; unsigned const right = aura_margins().right + decor_margins().right; diff --git a/repos/gems/src/app/themed_decorator/theme.h b/repos/gems/src/app/themed_decorator/theme.h index 8ce032730b..432fceba26 100644 --- a/repos/gems/src/app/themed_decorator/theme.h +++ b/repos/gems/src/app/themed_decorator/theme.h @@ -23,15 +23,15 @@ namespace Decorator { class Theme; - typedef Genode::Pixel_rgb888 Pixel_rgb888; - typedef Genode::Pixel_alpha8 Pixel_alpha8; + using Pixel_rgb888 = Genode::Pixel_rgb888; + using Pixel_alpha8 = Genode::Pixel_alpha8; - typedef Genode::Surface Pixel_surface; - typedef Genode::Surface Alpha_surface; + using Pixel_surface = Genode::Surface; + using Alpha_surface = Genode::Surface; - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Area = Genode::Surface_base::Area; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; } diff --git a/repos/gems/src/app/themed_decorator/tint_painter.h b/repos/gems/src/app/themed_decorator/tint_painter.h index eb613824ae..1f2d5e4d42 100644 --- a/repos/gems/src/app/themed_decorator/tint_painter.h +++ b/repos/gems/src/app/themed_decorator/tint_painter.h @@ -20,7 +20,7 @@ struct Tint_painter { - typedef Genode::Surface_base::Rect Rect; + using Rect = Genode::Surface_base::Rect; /** * Tint box with specified color diff --git a/repos/gems/src/app/themed_decorator/window.h b/repos/gems/src/app/themed_decorator/window.h index 782a817e7f..de11481e36 100644 --- a/repos/gems/src/app/themed_decorator/window.h +++ b/repos/gems/src/app/themed_decorator/window.h @@ -33,8 +33,8 @@ namespace Decorator { class Window; - typedef Genode::String<200> Window_title; - typedef Genode::Attached_dataspace Attached_dataspace; + using Window_title = Genode::String<200>; + using Attached_dataspace = Genode::Attached_dataspace; } @@ -143,7 +143,7 @@ class Decorator::Window : public Window_base, public Animator::Item struct Gui_view { - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; bool const _view_is_remote; diff --git a/repos/gems/src/app/trace_recorder/monitor.cc b/repos/gems/src/app/trace_recorder/monitor.cc index 31331eb8ba..f15954eac9 100644 --- a/repos/gems/src/app/trace_recorder/monitor.cc +++ b/repos/gems/src/app/trace_recorder/monitor.cc @@ -18,7 +18,7 @@ using namespace Genode; Directory::Path Trace_recorder::Monitor::Trace_directory::subject_path(::Subject_info const &info) { - typedef Path Label_path; + using Label_path = Path; Label_path label_path = path_from_label(info.session_label().string()); Directory::Path subject_path(Directory::join(_path, label_path.string())); diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index f5a3dab4ef..d2c1f3fb26 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -445,7 +445,7 @@ class Vfs_replay void kick_off(Genode::Allocator &alloc, char const *file) { - typedef Vfs::Directory_service::Open_result Open_result; + using Open_result = Vfs::Directory_service::Open_result; Open_result res = _vfs.open(file, Vfs::Directory_service::OPEN_MODE_RDWR, diff --git a/repos/gems/src/app/window_layouter/assign.h b/repos/gems/src/app/window_layouter/assign.h index 1c956cde1b..ca288f8d0a 100644 --- a/repos/gems/src/app/window_layouter/assign.h +++ b/repos/gems/src/app/window_layouter/assign.h @@ -43,7 +43,7 @@ class Window_layouter::Assign : public List_model::Element : Registry::Element(registry, *this), window(window) { } }; - typedef String<80> Label; + using Label = String<80>; private: diff --git a/repos/gems/src/app/window_layouter/key_sequence_tracker.h b/repos/gems/src/app/window_layouter/key_sequence_tracker.h index bd67f2626b..27619ad8ae 100644 --- a/repos/gems/src/app/window_layouter/key_sequence_tracker.h +++ b/repos/gems/src/app/window_layouter/key_sequence_tracker.h @@ -100,7 +100,7 @@ class Window_layouter::Key_sequence_tracker char const *node_type = entry.type == Stack::Entry::PRESS ? "press" : "release"; - typedef String<32> Key_name; + using Key_name = String<32>; Key_name const key(Input::key_name(entry.keycode)); Xml_node result(""); @@ -160,7 +160,7 @@ class Window_layouter::Key_sequence_tracker if (!node.has_attribute("action")) return; - typedef String<32> Action; + using Action = String<32>; Action action = node.attribute_value("action", Action()); using Name = Window_layouter::Target::Name; diff --git a/repos/gems/src/app/window_layouter/main.cc b/repos/gems/src/app/window_layouter/main.cc index c4bf536a07..3b22eea48a 100644 --- a/repos/gems/src/app/window_layouter/main.cc +++ b/repos/gems/src/app/window_layouter/main.cc @@ -558,7 +558,7 @@ void Window_layouter::Main::_gen_rules_with_frontmost_screen(Target::Name const static Window_layouter::Window::Element _element_from_hover_model(Genode::Xml_node hover_window_xml) { - typedef Window_layouter::Window::Element::Type Type; + using Type = Window_layouter::Window::Element::Type; bool const left_sizer = hover_window_xml.has_sub_node("left_sizer"), right_sizer = hover_window_xml.has_sub_node("right_sizer"), diff --git a/repos/gems/src/app/window_layouter/target.h b/repos/gems/src/app/window_layouter/target.h index b0f48eeece..89b0833fdf 100644 --- a/repos/gems/src/app/window_layouter/target.h +++ b/repos/gems/src/app/window_layouter/target.h @@ -24,7 +24,7 @@ class Window_layouter::Target : Noncopyable { public: - typedef String<64> Name; + using Name = String<64>; enum class Visible { YES, NO }; diff --git a/repos/gems/src/app/window_layouter/types.h b/repos/gems/src/app/window_layouter/types.h index 254fcc37e1..870081072b 100644 --- a/repos/gems/src/app/window_layouter/types.h +++ b/repos/gems/src/app/window_layouter/types.h @@ -21,9 +21,9 @@ namespace Window_layouter { using namespace Genode; - typedef Surface_base::Point Point; - typedef Surface_base::Area Area; - typedef Surface_base::Rect Rect; + using Point = Surface_base::Point; + using Area = Surface_base::Area; + using Rect = Surface_base::Rect; struct Window_id { diff --git a/repos/gems/src/app/window_layouter/window.h b/repos/gems/src/app/window_layouter/window.h index 50d866ec05..f9465eba8f 100644 --- a/repos/gems/src/app/window_layouter/window.h +++ b/repos/gems/src/app/window_layouter/window.h @@ -30,8 +30,8 @@ class Window_layouter::Window : public List_model::Element { public: - typedef String<256> Title; - typedef String<256> Label; + using Title = String<256>; + using Label = String<256>; struct Element { diff --git a/repos/gems/src/lib/ttf_font/ttf_font.cc b/repos/gems/src/lib/ttf_font/ttf_font.cc index 775e867ae4..72aa8eea34 100644 --- a/repos/gems/src/lib/ttf_font/ttf_font.cc +++ b/repos/gems/src/lib/ttf_font/ttf_font.cc @@ -99,7 +99,7 @@ struct Ttf_font::Glyph_buffer Allocator &alloc; - typedef Glyph_painter::Glyph::Opacity Opacity; + using Opacity = Glyph_painter::Glyph::Opacity; /** * Maximum number of opacity values that fit in the buffer diff --git a/repos/gems/src/lib/vfs/gpu/vfs.cc b/repos/gems/src/lib/vfs/gpu/vfs.cc index aa8339df12..cc81b3f10c 100644 --- a/repos/gems/src/lib/vfs/gpu/vfs.cc +++ b/repos/gems/src/lib/vfs/gpu/vfs.cc @@ -87,7 +87,7 @@ struct Vfs_gpu::File_system : Single_file_system Vfs::Env &_env; - typedef String<32> Config; + using Config = String<32>; Id_space _handle_space { }; Id_space::Id _last_id { .value = ~0ul }; diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 2fb4a959d4..de864aa149 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -20,22 +20,23 @@ namespace Vfs_pipe { using namespace Vfs; - typedef Vfs::Directory_service::Open_result Open_result; - typedef Vfs::File_io_service::Write_result Write_result; - typedef Vfs::File_io_service::Read_result Read_result; - typedef Genode::Path Path; + using Open_result = Vfs::Directory_service::Open_result; + using Write_result = Vfs::File_io_service::Write_result; + using Read_result = Vfs::File_io_service::Read_result; + using Path = Genode::Path; enum { PIPE_BUF_SIZE = 8192U }; - typedef Genode::Ring_buffer Pipe_buffer; + using Pipe_buffer = Genode::Ring_buffer; struct Pipe_handle; - typedef Genode::Fifo_element Handle_element; - typedef Genode::Fifo Handle_fifo; - typedef Genode::Registry::Element Pipe_handle_registry_element; - typedef Genode::Registry Pipe_handle_registry; + using Handle_element = Genode::Fifo_element; + using Handle_fifo = Genode::Fifo; + + using Pipe_handle_registry_element = Genode::Registry::Element; + using Pipe_handle_registry = Genode::Registry; struct Pipe; - typedef Genode::Id_space Pipe_space; + using Pipe_space = Genode::Id_space; struct New_pipe_handle; @@ -104,7 +105,7 @@ struct Vfs_pipe::Pipe ~Pipe() = default; - typedef Genode::String<8> Name; + using Name = Genode::String<8>; Name name() const { return Name(space_elem.id().value); diff --git a/repos/gems/src/lib/vfs/trace/vfs.cc b/repos/gems/src/lib/vfs/trace/vfs.cc index c444f74342..17d261b162 100644 --- a/repos/gems/src/lib/vfs/trace/vfs.cc +++ b/repos/gems/src/lib/vfs/trace/vfs.cc @@ -94,8 +94,7 @@ class Vfs_trace::Trace_buffer_file_system : public Single_file_system size_t _stat_size { 0 }; Trace_entries _entries { _env }; - - typedef String<32> Config; + using Config = String<32>; static Config _config() { @@ -291,7 +290,7 @@ class Vfs_trace::Subject : private Subject_factory, { private: - typedef String<200> Config; + using Config = String<200>; Io::Watch_handler _enable_handler { _enabled_fs, "/enable", @@ -439,7 +438,7 @@ class Vfs_trace::File_system : private Local_factory, { private: - typedef String<512*1024> Config; + using Config = String<512*1024>; static char const *_config(Vfs::Env &vfs_env, Trace_directory &directory) { diff --git a/repos/gems/src/lib/vfs/tresor_crypto/vfs.cc b/repos/gems/src/lib/vfs/tresor_crypto/vfs.cc index 053fd27b0f..078375065e 100644 --- a/repos/gems/src/lib/vfs/tresor_crypto/vfs.cc +++ b/repos/gems/src/lib/vfs/tresor_crypto/vfs.cc @@ -330,7 +330,7 @@ class Vfs_tresor_crypto::Key_file_system : private Key_local_factory, uint32_t _key_id; - typedef String<128> Config; + using Config = String<128>; static Config _config(uint32_t key_id) { @@ -1096,7 +1096,7 @@ class Vfs_tresor_crypto::File_system : private Local_factory, { private: - typedef String<128> Config; + using Config = String<128>; static Config _config(Xml_node node) { diff --git a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h index 62e6c0fb5d..e099be0353 100644 --- a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h +++ b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h @@ -27,8 +27,8 @@ namespace Vfs { class Glyphs_file_system; - typedef Text_painter::Font Font; - typedef Vfs_font::Glyph_header Glyph_header; + using Font = Text_painter::Font; + using Glyph_header = Vfs_font::Glyph_header; } @@ -112,8 +112,8 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system bool write_ready() const override { return false; } }; - typedef Registered Registered_watch_handle; - typedef Registry Watch_handle_registry; + using Registered_watch_handle = Registered; + using Watch_handle_registry = Registry; Watch_handle_registry _handle_registry { }; diff --git a/repos/gems/src/lib/vfs/ttf/vfs.cc b/repos/gems/src/lib/vfs/ttf/vfs.cc index 259b888aec..9d64c9ca64 100644 --- a/repos/gems/src/lib/vfs/ttf/vfs.cc +++ b/repos/gems/src/lib/vfs/ttf/vfs.cc @@ -32,13 +32,13 @@ namespace Vfs_ttf { class Local_factory; class File_system; - typedef Text_painter::Font Font; + using Font = Text_painter::Font; } struct Vfs_ttf::Font_from_file { - typedef Directory::Path Path; + using Path = Directory::Path; Directory const _dir; File_content const _content; @@ -164,13 +164,13 @@ class Vfs_ttf::File_system : private Local_factory, { private: - typedef String<200> Config; + using Config = String<200>; static Config _config(Xml_node node) { char buf[Config::capacity()] { }; Xml_generator xml(buf, sizeof(buf), "dir", [&] () { - typedef String<64> Name; + using Name = String<64>; xml.attribute("name", node.attribute_value("name", Name())); xml.node("glyphs", [&] () { }); xml.node("readonly_value", [&] () { xml.attribute("name", "baseline"); }); diff --git a/repos/gems/src/server/cpu_sampler/cpu_session_component.h b/repos/gems/src/server/cpu_sampler/cpu_session_component.h index 5eb6cec609..667bc443c5 100644 --- a/repos/gems/src/server/cpu_sampler/cpu_session_component.h +++ b/repos/gems/src/server/cpu_sampler/cpu_session_component.h @@ -27,8 +27,9 @@ namespace Cpu_sampler { using namespace Genode; class Cpu_session_component; - typedef List> Thread_list; - typedef List_element Thread_element; + + using Thread_list = List>; + using Thread_element = List_element; template void for_each_thread(Thread_list &thread_list, FN const &fn); diff --git a/repos/gems/src/server/file_terminal/main.cc b/repos/gems/src/server/file_terminal/main.cc index 03e2465dcd..e7ca563667 100644 --- a/repos/gems/src/server/file_terminal/main.cc +++ b/repos/gems/src/server/file_terminal/main.cc @@ -250,7 +250,7 @@ namespace Terminal { throw Service_denied(); } - typedef String<256> File_name; + using File_name = String<256>; File_name const file_name = policy.attribute_value("filename", File_name()); diff --git a/repos/gems/src/server/gui_fader/alpha_dither_painter.h b/repos/gems/src/server/gui_fader/alpha_dither_painter.h index 0c0aefb2c6..f978dc62c6 100644 --- a/repos/gems/src/server/gui_fader/alpha_dither_painter.h +++ b/repos/gems/src/server/gui_fader/alpha_dither_painter.h @@ -21,10 +21,9 @@ struct Alpha_dither_painter { - typedef Genode::Pixel_alpha8 Pixel_alpha8; - - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Surface_base::Point Point; + using Pixel_alpha8 = Genode::Pixel_alpha8; + using Rect = Genode::Surface_base::Rect; + using Point = Genode::Surface_base::Point; /* * \param fade fade value in 16.16 fixpoint format diff --git a/repos/gems/src/server/gui_fader/main.cc b/repos/gems/src/server/gui_fader/main.cc index b0386043b4..2cd96074e6 100644 --- a/repos/gems/src/server/gui_fader/main.cc +++ b/repos/gems/src/server/gui_fader/main.cc @@ -37,9 +37,9 @@ namespace Gui_fader { class Framebuffer_session_component; class Gui_session_component; - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Area = Genode::Surface_base::Area; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; using Genode::size_t; using Genode::Xml_node; @@ -50,8 +50,8 @@ namespace Gui_fader { using Genode::Reconstructible; using Genode::Constructible; - typedef Genode::Pixel_rgb888 Pixel_rgb888; - typedef Genode::Pixel_alpha8 Pixel_alpha8; + using Pixel_rgb888 = Genode::Pixel_rgb888; + using Pixel_alpha8 = Genode::Pixel_alpha8; } @@ -62,7 +62,7 @@ class Gui_fader::Src_buffer { private: - typedef Pixel_rgb888 Pixel; + using Pixel = Pixel_rgb888; bool const _use_alpha; Attached_ram_dataspace _ds; @@ -259,8 +259,8 @@ class Gui_fader::Gui_session_component { private: - typedef Gui::View_capability View_capability; - typedef Gui::Session::View_handle View_handle; + using View_capability = Gui::View_capability; + using View_handle = Gui::Session::View_handle; Genode::Env &_env; @@ -288,7 +288,7 @@ class Gui_fader::Gui_session_component if (!_view_handle.valid() || (_view_visible == _fb_session.visible())) return; - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; if (_fb_session.visible()) _gui.enqueue(_view_handle, _view_geometry); diff --git a/repos/gems/src/server/tcp_terminal/main.cc b/repos/gems/src/server/tcp_terminal/main.cc index 688d630400..dd71281996 100644 --- a/repos/gems/src/server/tcp_terminal/main.cc +++ b/repos/gems/src/server/tcp_terminal/main.cc @@ -592,7 +592,7 @@ class Terminal::Root_component : public Genode::Root_component Ip; + using Ip = Genode::String<16>; Ip ip_addr = policy.attribute_value("ip", Ip()); Libc::with_libc([&] () { session = new (md_alloc()) diff --git a/repos/gems/src/server/terminal/font_family.h b/repos/gems/src/server/terminal/font_family.h index e3bc72c472..7f7f89661c 100644 --- a/repos/gems/src/server/terminal/font_family.h +++ b/repos/gems/src/server/terminal/font_family.h @@ -18,7 +18,7 @@ #include "types.h" namespace Terminal { - typedef Text_painter::Font Font; + using Font = Text_painter::Font; class Font_family; } diff --git a/repos/gems/src/server/terminal/main.cc b/repos/gems/src/server/terminal/main.cc index 7f728ba6db..e2dad8edcc 100644 --- a/repos/gems/src/server/terminal/main.cc +++ b/repos/gems/src/server/terminal/main.cc @@ -128,7 +128,7 @@ struct Terminal::Main : Character_consumer struct Paste_buffer { char buffer[READ_BUFFER_SIZE]; } _paste_buffer { }; - typedef Pixel_rgb888 PT; + using PT = Pixel_rgb888; Constructible> _text_screen_surface { }; @@ -161,7 +161,7 @@ struct Terminal::Main : Character_consumer /* update view geometry after mode change */ if (_fb_mode.area != _flushed_fb_mode.area) { - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; _gui.enqueue(_view, Rect(Point(0, 0), _fb_mode.area)); _gui.enqueue(_view, Gui::Session::View_handle()); _gui.execute(); @@ -280,7 +280,7 @@ void Terminal::Main::_handle_config() _text_screen_surface->size() != new_geometry.size(); if (reconstruct) { - typedef Text_screen_surface::Snapshot Snapshot; + using Snapshot = Text_screen_surface::Snapshot; Constructible snapshot { }; size_t const snapshot_bytes = _text_screen_surface.constructed() diff --git a/repos/gems/src/server/terminal/text_screen_surface.h b/repos/gems/src/server/terminal/text_screen_surface.h index 0518f133cd..149ee8c826 100644 --- a/repos/gems/src/server/terminal/text_screen_surface.h +++ b/repos/gems/src/server/terminal/text_screen_surface.h @@ -38,8 +38,8 @@ class Terminal::Text_screen_surface class Invalid_framebuffer_size : Genode::Exception { }; - typedef Text_painter::Font Font; - typedef Glyph_painter::Fixpoint_number Fixpoint_number; + using Font = Text_painter::Font; + using Fixpoint_number = Glyph_painter::Fixpoint_number; struct Geometry { diff --git a/repos/gems/src/server/terminal/types.h b/repos/gems/src/server/terminal/types.h index 569614f6c6..1eb7ab86fa 100644 --- a/repos/gems/src/server/terminal/types.h +++ b/repos/gems/src/server/terminal/types.h @@ -28,9 +28,9 @@ namespace Terminal { using namespace Genode; - typedef Surface_base::Rect Rect; - typedef Surface_base::Area Area; - typedef Surface_base::Point Point; + using Rect = Surface_base::Rect; + using Area = Surface_base::Area; + using Point = Surface_base::Point; struct Character_consumer : Interface { diff --git a/repos/gems/src/server/wm/gui.h b/repos/gems/src/server/wm/gui.h index 101265fd81..0a27941d5a 100644 --- a/repos/gems/src/server/wm/gui.h +++ b/repos/gems/src/server/wm/gui.h @@ -67,9 +67,9 @@ namespace Wm { namespace Gui { class Session_component; class Root; - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Surface_base::Point Point; - typedef Genode::Session_label Session_label; + using Rect = Genode::Surface_base::Rect; + using Point = Genode::Surface_base::Point; + using Session_label = Genode::Session_label; } } @@ -509,8 +509,7 @@ class Wm::Gui::Session_component : public Rpc_object, /* * View handle registry */ - typedef Genode::Handle_registry - View_handle_registry; + using View_handle_registry = Genode::Handle_registry; View_handle_registry _view_handle_registry; diff --git a/repos/gems/src/server/wm/window_registry.h b/repos/gems/src/server/wm/window_registry.h index 5dc203e17f..4736c40578 100644 --- a/repos/gems/src/server/wm/window_registry.h +++ b/repos/gems/src/server/wm/window_registry.h @@ -34,9 +34,9 @@ namespace Wm { using Genode::Xml_generator; using Genode::Reporter; - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Area = Genode::Surface_base::Area; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; } @@ -61,8 +61,8 @@ class Wm::Window_registry { public: - typedef Genode::String<200> Title; - typedef Genode::Session_label Session_label; + using Title = Genode::String<200>; + using Session_label = Genode::Session_label; enum Has_alpha { HAS_ALPHA, HAS_NO_ALPHA }; diff --git a/repos/gems/src/test/decorator_stress/main.cc b/repos/gems/src/test/decorator_stress/main.cc index 61cbe49d1d..3f129d0b0a 100644 --- a/repos/gems/src/test/decorator_stress/main.cc +++ b/repos/gems/src/test/decorator_stress/main.cc @@ -22,9 +22,9 @@ /* libc includes */ #include -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; struct Param diff --git a/repos/gems/src/test/text_painter/main.cc b/repos/gems/src/test/text_painter/main.cc index 4af2168b4e..6ad5a28685 100644 --- a/repos/gems/src/test/text_painter/main.cc +++ b/repos/gems/src/test/text_painter/main.cc @@ -33,9 +33,9 @@ namespace Test { using namespace Genode; - typedef Surface_base::Point Point; - typedef Surface_base::Area Area; - typedef Surface_base::Rect Rect; + using Point = Surface_base::Point; + using Area = Surface_base::Area; + using Rect = Surface_base::Rect; struct Main; }; @@ -55,7 +55,7 @@ struct Test::Main Attached_dataspace _fb_ds { _env.rm(), _fb.dataspace() }; - typedef Pixel_rgb888 PT; + using PT = Pixel_rgb888; Surface_base::Area const _size = _fb.mode().area; diff --git a/repos/gems/src/test/tiled_wm/manager/main.cc b/repos/gems/src/test/tiled_wm/manager/main.cc index 7e3d669453..e809f680b6 100644 --- a/repos/gems/src/test/tiled_wm/manager/main.cc +++ b/repos/gems/src/test/tiled_wm/manager/main.cc @@ -21,7 +21,7 @@ #include -typedef Genode::String<32> Name; +using Name = Genode::String<32>; namespace Test { struct Manager; } diff --git a/repos/gems/src/test/tiled_wm/util.h b/repos/gems/src/test/tiled_wm/util.h index cc4e57e911..ab94f424b0 100644 --- a/repos/gems/src/test/tiled_wm/util.h +++ b/repos/gems/src/test/tiled_wm/util.h @@ -36,7 +36,7 @@ /* qt5_component includes */ #include -typedef Genode::String<32> Name; +using Name = Genode::String<32>; /* diff --git a/repos/libports/src/app/acpica/os.cc b/repos/libports/src/app/acpica/os.cc index 2f8e4f0bc4..919f83921e 100644 --- a/repos/libports/src/app/acpica/os.cc +++ b/repos/libports/src/app/acpica/os.cc @@ -138,7 +138,7 @@ struct Acpica::Statechange Xml_node system(_system_state.local_addr(), _system_state.size()); - typedef String<32> State; + using State = String<32>; State const state = system.attribute_value("state", State()); if (_enable_poweroff && state == "poweroff") { diff --git a/repos/libports/src/app/extract/main.cc b/repos/libports/src/app/extract/main.cc index ec473d39a1..0e949c909b 100644 --- a/repos/libports/src/app/extract/main.cc +++ b/repos/libports/src/app/extract/main.cc @@ -108,8 +108,8 @@ struct Extract::Extracted_archive : Noncopyable } } dst { }; - typedef String<256> Path; - typedef String<80> Raw_name; + using Path = String<256>; + using Raw_name = String<80>; struct Exception : Genode::Exception { }; struct Open_failed : Exception { }; @@ -235,8 +235,8 @@ struct Extract::Main { Env &_env; - typedef Extracted_archive::Path Path; - typedef Extracted_archive::Raw_name Raw_name; + using Path = Extracted_archive::Path; + using Raw_name = Extracted_archive::Raw_name; Attached_rom_dataspace _config { _env, "config" }; diff --git a/repos/libports/src/app/fetchurl/component.cc b/repos/libports/src/app/fetchurl/component.cc index 4d747ba61e..77629d9a6a 100644 --- a/repos/libports/src/app/fetchurl/component.cc +++ b/repos/libports/src/app/fetchurl/component.cc @@ -40,8 +40,8 @@ namespace Fetchurl { using namespace Genode; - typedef String<256> Url; - typedef Path<256> Path; + using Url = String<256>; + using Path = Path<256>; } static size_t write_callback(char *ptr, diff --git a/repos/libports/src/app/pdf_view/main.cc b/repos/libports/src/app/pdf_view/main.cc index 12cc868a7e..225cbcf3d0 100644 --- a/repos/libports/src/app/pdf_view/main.cc +++ b/repos/libports/src/app/pdf_view/main.cc @@ -42,7 +42,7 @@ extern "C" { #pragma GCC diagnostic pop /* restore -Wconversion warnings */ -typedef Genode::Pixel_rgb888 pixel_t; +using pixel_t = Genode::Pixel_rgb888; static void copy_line_rgba(const unsigned char *rgba_src, @@ -83,7 +83,7 @@ class Pdf_view class Non_supported_framebuffer_mode { }; class Unexpected_document_color_depth { }; - typedef Framebuffer::Mode Mode; + using Mode = Framebuffer::Mode; private: @@ -142,7 +142,7 @@ class Pdf_view _pdfapp.resolution = Genode::min(_nit_mode.area.w/5, _nit_mode.area.h/4); - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; _gui.enqueue(_view, Gui::Rect(Gui::Point(), _nit_mode.area)); _gui.enqueue(_view, Gui::Session::View_handle()); _gui.execute(); @@ -273,7 +273,7 @@ class Pdf_view void title(char const *msg) { - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; _gui.enqueue(_view, msg); _gui.execute(); } diff --git a/repos/libports/src/lib/gcov/libc/libc.cc b/repos/libports/src/lib/gcov/libc/libc.cc index 99567f7340..d33f660954 100644 --- a/repos/libports/src/lib/gcov/libc/libc.cc +++ b/repos/libports/src/lib/gcov/libc/libc.cc @@ -29,7 +29,7 @@ extern "C" { using namespace Genode; -typedef Path Absolute_path; +using Absolute_path = Path; struct FILE { }; @@ -276,7 +276,7 @@ extern "C" FILE *fopen(const char *path, const char *mode) libgcov_node.for_each_sub_node("annotate", [&] (Xml_node annotate_node) { - typedef String Source; + using Source = String; Source const source = annotate_node.attribute_value("source", Source()); seek_offset += gcov_env->write(annotate_file_handle, diff --git a/repos/libports/src/lib/libc/execve.cc b/repos/libports/src/lib/libc/execve.cc index 55913b7158..d1d8a6e135 100644 --- a/repos/libports/src/lib/libc/execve.cc +++ b/repos/libports/src/lib/libc/execve.cc @@ -135,7 +135,7 @@ struct Libc::Interpreter } } - typedef String Path; + using Path = String; Path path() const { @@ -205,7 +205,7 @@ struct Libc::Interpreter */ struct Libc::String_array : Noncopyable { - typedef Genode::Allocator Allocator; + using Allocator = Genode::Allocator; Allocator &_alloc; diff --git a/repos/libports/src/lib/libc/file_operations.cc b/repos/libports/src/lib/libc/file_operations.cc index 466f81b4eb..246dd2dad7 100644 --- a/repos/libports/src/lib/libc/file_operations.cc +++ b/repos/libports/src/lib/libc/file_operations.cc @@ -99,7 +99,7 @@ static Absolute_path &cwd() } -typedef Token Path_element_token; +using Path_element_token = Token; /** diff --git a/repos/libports/src/lib/libc/fork.cc b/repos/libports/src/lib/libc/fork.cc index acd7d3d4b4..ea01e6bf24 100644 --- a/repos/libports/src/lib/libc/fork.cc +++ b/repos/libports/src/lib/libc/fork.cc @@ -50,7 +50,7 @@ namespace Libc { virtual void child_ready() = 0; }; - typedef Registry > Forked_children; + using Forked_children = Registry >; } using namespace Libc; @@ -125,7 +125,7 @@ struct Libc::Child_config void Libc::Child_config::_generate(Xml_generator &xml, Xml_node config) { - typedef String<30> Addr; + using Addr = String<30>; /* * Disarm the dynamic linker's sanity check for the @@ -139,7 +139,7 @@ void Libc::Child_config::_generate(Xml_generator &xml, Xml_node config) xml.attribute("pid", _pid); - typedef String Path; + using Path = String; config.with_optional_sub_node("libc", [&] (Xml_node node) { if (node.has_attribute("rtc")) xml.attribute("rtc", node.attribute_value("rtc", Path())); @@ -167,7 +167,7 @@ void Libc::Child_config::_generate(Xml_generator &xml, Xml_node config) xml.node("stack", [&] () { gen_range_attr(_user_stack_base_ptr, _user_stack_size); }); - typedef Dynamic_linker::Object_info Info; + using Info = Dynamic_linker::Object_info; Dynamic_linker::for_each_loaded_object(_env, [&] (Info const &info) { xml.node("rw", [&] () { xml.attribute("name", info.name); @@ -200,7 +200,7 @@ class Libc::Parent_services : Noncopyable Env &_env; Allocator &_alloc; - typedef Registered Registered_service; + using Registered_service = Registered; Registry _services { }; @@ -235,7 +235,7 @@ class Libc::Parent_services : Noncopyable struct Libc::Local_rom_service : Noncopyable { - typedef Session_label Rom_name; + using Rom_name = Session_label; struct Session : Session_object { @@ -259,7 +259,7 @@ struct Libc::Local_rom_service : Noncopyable } _session; - typedef Local_service Service; + using Service = Local_service; Service::Single_session_factory _factory { _session }; @@ -282,7 +282,7 @@ struct Libc::Local_rom_services : Noncopyable { Allocator &_alloc; - typedef Registered Registered_service; + using Registered_service = Registered; Registry _services { }; @@ -290,7 +290,7 @@ struct Libc::Local_rom_services : Noncopyable : _alloc(alloc) { - typedef Dynamic_linker::Object_info Info; + using Info = Dynamic_linker::Object_info; Dynamic_linker::for_each_loaded_object(env, [&] (Info const &info) { new (alloc) Registered_service(_services, fork_ep, info.name, info.ds_cap); }); @@ -352,7 +352,7 @@ struct Libc::Local_clone_service : Noncopyable } _session; - typedef Local_service Service; + using Service = Local_service; Child_ready &_child_ready; diff --git a/repos/libports/src/lib/libc/getpwent.cc b/repos/libports/src/lib/libc/getpwent.cc index a5c867d786..dd7cfbb87c 100644 --- a/repos/libports/src/lib/libc/getpwent.cc +++ b/repos/libports/src/lib/libc/getpwent.cc @@ -28,7 +28,7 @@ namespace Libc { struct Passwd_fields; - typedef String<128> Passwd_string; + using Passwd_string = String<128>; } diff --git a/repos/libports/src/lib/libc/internal/fd_alloc.h b/repos/libports/src/lib/libc/internal/fd_alloc.h index 8cd540d790..fe9c3b2ed9 100644 --- a/repos/libports/src/lib/libc/internal/fd_alloc.h +++ b/repos/libports/src/lib/libc/internal/fd_alloc.h @@ -45,7 +45,7 @@ namespace Libc { { Genode::Mutex mutex { }; - typedef Genode::Id_space Id_space; + using Id_space = Genode::Id_space; Id_space::Element _elem; int const libc_fd = _elem.id().value; @@ -75,7 +75,7 @@ namespace Libc { Genode::Allocator &_alloc; - typedef File_descriptor::Id_space Id_space; + using Id_space = File_descriptor::Id_space; Id_space _id_space; diff --git a/repos/libports/src/lib/libc/internal/file_operations.h b/repos/libports/src/lib/libc/internal/file_operations.h index cce9b93565..4e8df510b8 100644 --- a/repos/libports/src/lib/libc/internal/file_operations.h +++ b/repos/libports/src/lib/libc/internal/file_operations.h @@ -26,7 +26,7 @@ namespace Libc { - typedef Genode::Path Absolute_path; + using Absolute_path = Genode::Path; struct Symlinks_resolved_ok { }; struct Symlink_resolve_error { }; diff --git a/repos/libports/src/lib/libc/internal/init.h b/repos/libports/src/lib/libc/internal/init.h index 8b8645638f..433ff7136c 100644 --- a/repos/libports/src/lib/libc/internal/init.h +++ b/repos/libports/src/lib/libc/internal/init.h @@ -101,7 +101,7 @@ namespace Libc { void init_malloc_cloned(Clone_connection &); void reinit_malloc(Genode::Allocator &); - typedef String Rtc_path; + using Rtc_path = String; /** * Init timing facilities diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index 0b16e3b913..2b632a93c7 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -195,7 +195,7 @@ struct Libc::Kernel final : Vfs::Read_ready_response_handler, : Xml_node(""); } - typedef String Config_attr; + using Config_attr = String; Config_attr const _rtc_path = _libc_env.libc_config().attribute_value("rtc", Config_attr()); @@ -652,7 +652,7 @@ struct Libc::Kernel final : Vfs::Read_ready_response_handler, Vfs::Vfs_watch_handle *alloc_watch_handle(char const *path) override { Vfs::Vfs_watch_handle *watch_handle { nullptr }; - typedef Vfs::Directory_service::Watch_result Result; + using Result = Vfs::Directory_service::Watch_result; return _libc_env.vfs().watch(path, &watch_handle, _heap) == Result::WATCH_OK ? watch_handle : nullptr; } diff --git a/repos/libports/src/lib/libc/internal/malloc_ram_allocator.h b/repos/libports/src/lib/libc/internal/malloc_ram_allocator.h index d2ee44c7c4..faf28e9a00 100644 --- a/repos/libports/src/lib/libc/internal/malloc_ram_allocator.h +++ b/repos/libports/src/lib/libc/internal/malloc_ram_allocator.h @@ -24,7 +24,7 @@ namespace Libc { struct Malloc_ram_allocator; } struct Libc::Malloc_ram_allocator : Ram_allocator { - typedef Genode::Allocator Allocator; + using Allocator = Genode::Allocator; Allocator &_md_alloc; Ram_allocator &_ram; diff --git a/repos/libports/src/lib/libc/internal/plugin.h b/repos/libports/src/lib/libc/internal/plugin.h index 9c63ee8cac..34295db1f0 100644 --- a/repos/libports/src/lib/libc/internal/plugin.h +++ b/repos/libports/src/lib/libc/internal/plugin.h @@ -33,7 +33,7 @@ namespace Libc { class File_descriptor; - typedef Genode::Path Absolute_path; + using Absolute_path = Genode::Path; class Plugin : public List::Element { @@ -41,7 +41,7 @@ namespace Libc { int _priority; - typedef Genode::size_t size_t; + using size_t = Genode::size_t; /* Resume all libc threads blocked for I/O */ void resume_all(); diff --git a/repos/libports/src/lib/libc/internal/types.h b/repos/libports/src/lib/libc/internal/types.h index 233da10b47..8fcaf141c7 100644 --- a/repos/libports/src/lib/libc/internal/types.h +++ b/repos/libports/src/lib/libc/internal/types.h @@ -22,8 +22,8 @@ namespace Libc { using namespace Genode; - typedef Genode::uint64_t uint64_t; - typedef String<64> Binary_name; + using uint64_t = Genode::uint64_t; + using Binary_name = String<64>; } #endif /* _LIBC__INTERNAL__TYPES_H_ */ diff --git a/repos/libports/src/lib/libc/kernel.cc b/repos/libports/src/lib/libc/kernel.cc index a820679034..e37fee0a93 100644 --- a/repos/libports/src/lib/libc/kernel.cc +++ b/repos/libports/src/lib/libc/kernel.cc @@ -71,7 +71,7 @@ void Libc::Kernel::reset_malloc_heap() void Libc::Kernel::_init_file_descriptors() { - typedef Genode::Token Path_element_token; + using Path_element_token = Genode::Token; /* guard used to print an offending libc config when leaving the scope */ struct Diag_guard @@ -171,7 +171,7 @@ void Libc::Kernel::_init_file_descriptors() return Symlinks_resolved_ok(); }; - typedef String Path; + using Path = String; struct Absolute_path_resolved_ok { }; struct Absolute_path_resolve_error { }; @@ -394,7 +394,7 @@ void Libc::Kernel::_clone_state_from_parent() /* clone RW segment of a shared library or the binary */ if (node.type() == "rw") { - typedef String<64> Name; + using Name = String<64>; Name const name = node.attribute_value("name", Name()); /* diff --git a/repos/libports/src/lib/libc/malloc.cc b/repos/libports/src/lib/libc/malloc.cc index f9af5efb6b..1a9e67b3b7 100644 --- a/repos/libports/src/lib/libc/malloc.cc +++ b/repos/libports/src/lib/libc/malloc.cc @@ -79,8 +79,8 @@ class Libc::Malloc { private: - typedef Genode::size_t size_t; - typedef Genode::addr_t addr_t; + using size_t = Genode::size_t; + using addr_t = Genode::addr_t; enum { SLAB_START = 5, /* 32 bytes (log2) */ diff --git a/repos/libports/src/lib/libc/socket_fs_plugin.cc b/repos/libports/src/lib/libc/socket_fs_plugin.cc index 264292470e..e9074d727f 100644 --- a/repos/libports/src/lib/libc/socket_fs_plugin.cc +++ b/repos/libports/src/lib/libc/socket_fs_plugin.cc @@ -94,8 +94,8 @@ namespace Libc { namespace Socket_fs { }; template class String; - typedef String Host_string; - typedef String Port_string; + using Host_string = String; + using Port_string = String; struct Sockaddr_string; struct New_socket_failed : Exception { }; @@ -1168,7 +1168,7 @@ extern "C" int socket_fs_socket(int domain, int type, int protocol) } /* socket is ensured to be TCP or UDP */ - typedef Socket_fs::Context::Proto Proto; + using Proto = Socket_fs::Context::Proto; Proto proto = (sock_type == SOCK_STREAM) ? Proto::TCP : Proto::UDP; Socket_fs::Context *context = nullptr; try { diff --git a/repos/libports/src/lib/libc/time.cc b/repos/libports/src/lib/libc/time.cc index a6168111ff..80667ff351 100644 --- a/repos/libports/src/lib/libc/time.cc +++ b/repos/libports/src/lib/libc/time.cc @@ -50,7 +50,7 @@ using namespace Libc; extern "C" __attribute__((weak)) int clock_gettime(clockid_t clk_id, struct timespec *ts) { - typedef Libc::uint64_t uint64_t; + using uint64_t = Libc::uint64_t; if (!ts) return Errno(EFAULT); diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index b061826348..d12acda2ef 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -156,7 +156,7 @@ namespace Libc { { private: - typedef String Value; + using Value = String; Value const _value; public: @@ -282,7 +282,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::open_from_kernel(const char *path, int Vfs::Vfs_handle *handle = 0; - typedef Vfs::Directory_service::Opendir_result Opendir_result; + using Opendir_result = Vfs::Directory_service::Opendir_result; switch (_root_fs.opendir(path, false, &handle, _alloc)) { case Opendir_result::OPENDIR_OK: break; @@ -317,7 +317,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::open_from_kernel(const char *path, int return nullptr; } - typedef Vfs::Directory_service::Open_result Result; + using Result = Vfs::Directory_service::Open_result; Vfs::Vfs_handle *handle = 0; @@ -414,7 +414,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::open(char const *path, int flags) Vfs::Vfs_handle *handle = 0; - typedef Vfs::Directory_service::Opendir_result Opendir_result; + using Opendir_result = Vfs::Directory_service::Opendir_result; switch (_root_fs.opendir(path, false, &handle, _alloc)) { case Opendir_result::OPENDIR_OK: break; @@ -449,7 +449,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::open(char const *path, int flags) } /* handle open for files */ - typedef Vfs::Directory_service::Open_result Result; + using Result = Vfs::Directory_service::Open_result; Vfs::Vfs_handle *handle = 0; @@ -630,7 +630,7 @@ int Libc::Vfs_plugin::dup2(File_descriptor *fd, { Vfs::Vfs_handle *handle = nullptr; - typedef Vfs::Directory_service::Open_result Result; + using Result = Vfs::Directory_service::Open_result; int result = -1; monitor().monitor([&] { @@ -659,7 +659,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::dup(File_descriptor *fd) { Vfs::Vfs_handle *handle = nullptr; - typedef Vfs::Directory_service::Open_result Result; + using Result = Vfs::Directory_service::Open_result; Libc::File_descriptor *result = nullptr; int result_errno = 0; @@ -744,7 +744,7 @@ int Libc::Vfs_plugin::mkdir(const char *path, mode_t mode) { Vfs::Vfs_handle *dir_handle { 0 }; - typedef Vfs::Directory_service::Opendir_result Opendir_result; + using Opendir_result = Vfs::Directory_service::Opendir_result; int result = -1; int result_errno = 0; @@ -779,7 +779,7 @@ int Libc::Vfs_plugin::stat_from_kernel(const char *path, struct stat *buf) return Errno(EFAULT); - typedef Vfs::Directory_service::Stat_result Result; + using Result = Vfs::Directory_service::Stat_result; Vfs::Directory_service::Stat stat; @@ -800,7 +800,7 @@ int Libc::Vfs_plugin::stat(char const *path, struct stat *buf) return Errno(EFAULT); } - typedef Vfs::Directory_service::Stat_result Result; + using Result = Vfs::Directory_service::Stat_result; Vfs::Directory_service::Stat stat; @@ -829,7 +829,7 @@ int Libc::Vfs_plugin::stat(char const *path, struct stat *buf) ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, ::size_t count) { - typedef Vfs::File_io_service::Write_result Result; + using Result = Vfs::File_io_service::Write_result; if ((fd->flags & O_ACCMODE) == O_RDONLY) { return Errno(EBADF); @@ -867,7 +867,7 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, return false; } - typedef Vfs::Directory_service::Stat_result Result; + using Result = Vfs::Directory_service::Stat_result; Vfs::Directory_service::Stat stat { }; @@ -959,7 +959,7 @@ ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf, return Errno(EBADF); } - typedef Vfs::File_io_service::Read_result Result; + using Result = Vfs::File_io_service::Read_result; Vfs::Vfs_handle *handle = vfs_handle(fd); @@ -1015,11 +1015,11 @@ ssize_t Libc::Vfs_plugin::getdirentries(File_descriptor *fd, char *buf, return -1; } - typedef Vfs::File_io_service::Read_result Result; + using Result = Vfs::File_io_service::Read_result; Vfs::Vfs_handle *handle = vfs_handle(fd); - typedef Vfs::Directory_service::Dirent Dirent; + using Dirent = Vfs::Directory_service::Dirent; Dirent dirent_out; @@ -2014,7 +2014,7 @@ int Libc::Vfs_plugin::ftruncate(File_descriptor *fd, ::off_t length) fd->modified = false; } - typedef Vfs::File_io_service::Ftruncate_result Result; + using Result = Vfs::File_io_service::Ftruncate_result; switch (handle->fs().ftruncate(handle, length)) { case Result::FTRUNCATE_ERR_NO_PERM: result_errno = EPERM; break; @@ -2110,7 +2110,7 @@ int Libc::Vfs_plugin::symlink(const char *target_path, const char *link_path) int result_errno { 0 }; monitor().monitor([&] { - typedef Vfs::Directory_service::Openlink_result Openlink_result; + using Openlink_result = Vfs::Directory_service::Openlink_result; Openlink_result openlink_result = _root_fs.openlink(link_path, true, &handle, _alloc); @@ -2209,7 +2209,7 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu switch (stage) { case Stage::OPEN: { - typedef Vfs::Directory_service::Openlink_result Openlink_result; + using Openlink_result = Vfs::Directory_service::Openlink_result; Openlink_result openlink_result = _root_fs.openlink(link_path, false, &handle, _alloc); @@ -2278,7 +2278,7 @@ int Libc::Vfs_plugin::rmdir(char const *path) int Libc::Vfs_plugin::unlink(char const *path) { - typedef Vfs::Directory_service::Unlink_result Result; + using Result = Vfs::Directory_service::Unlink_result; bool succeeded = false; int result_errno = 0; @@ -2300,7 +2300,7 @@ int Libc::Vfs_plugin::unlink(char const *path) int Libc::Vfs_plugin::rename(char const *from_path, char const *to_path) { - typedef Vfs::Directory_service::Rename_result Result; + using Result = Vfs::Directory_service::Rename_result; bool succeeded = false; int result_errno = false; @@ -2393,7 +2393,7 @@ void *Libc::Vfs_plugin::mmap(void *addr_in, ::size_t length, int prot, int flags /* create another VFS handle to keep the file open as long as the mapping exists */ Vfs::Vfs_handle *reference_handle = nullptr; - typedef Vfs::Directory_service::Open_result Result; + using Result = Vfs::Directory_service::Open_result; Result vfs_open_result; monitor().monitor([&] { vfs_open_result = _root_fs.open(fd->fd_path, fd->flags, diff --git a/repos/libports/src/lib/libyuv/memory.cc b/repos/libports/src/lib/libyuv/memory.cc index bde842159c..534f8504d6 100644 --- a/repos/libports/src/lib/libyuv/memory.cc +++ b/repos/libports/src/lib/libyuv/memory.cc @@ -15,7 +15,7 @@ #include -typedef void * (*type_malloc)(unsigned long); +typedef void * (*type_malloc)(unsigned long); typedef void (*type_free )(void *); diff --git a/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.cpp b/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.cpp index df10795e03..4ba4fd9ab8 100644 --- a/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.cpp +++ b/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.cpp @@ -167,7 +167,7 @@ void QGenodeViewWidget::hideEvent(QHideEvent *event) QEmbeddedViewWidget::View_geometry const view_geometry = QEmbeddedViewWidget::_calc_view_geometry(); - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; Gui::Rect const geometry(Gui::Point(mapToGlobal(pos()).x(), mapToGlobal(pos()).y()), @@ -192,7 +192,7 @@ void QGenodeViewWidget::paintEvent(QPaintEvent *event) QEmbeddedViewWidget::View_geometry const view_geometry = QEmbeddedViewWidget::_calc_view_geometry(); - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; /* argument to mapToGlobal() is relative to the Widget's origin * the plugin view starts at (0, 0) diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc index 04c2e80724..cbdc806d79 100644 --- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc +++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc @@ -40,15 +40,16 @@ class Fatfs::File_system : public Vfs::File_system { private: - typedef Genode::Path Path; + using Path = Genode::Path; struct Fatfs_file_handle; struct Fatfs_dir_handle; struct Fatfs_file_watch_handle; struct Fatfs_dir_watch_handle; - typedef Genode::List Fatfs_file_handles; - typedef Genode::List Fatfs_dir_watch_handles; - typedef Genode::List Fatfs_watch_handles; + + using Fatfs_file_handles = Genode::List; + using Fatfs_dir_watch_handles = Genode::List; + using Fatfs_watch_handles = Genode::List; /** * The FatFS library does not support opening a file diff --git a/repos/libports/src/lib/vfs/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h index a93771de53..9a5433627c 100644 --- a/repos/libports/src/lib/vfs/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -219,7 +219,7 @@ class Lwip::Nic_netif { _dhcp = config.attribute_value("dhcp", false); - typedef Genode::String Str; + using Str = Genode::String; Str ip_str = config.attribute_value("ip_addr", Str()); if (_dhcp && ip_str != "") { @@ -476,7 +476,7 @@ static void nic_netif_status_callback(struct netif *netif) Genode::log("lwIP Nic interface up" ", address=",(char const*)ip6addr_ntoa(netif_ip6_addr(netif, 0))); } else if (!ip4_addr_isany(netif_ip4_addr(netif))) { - typedef Genode::String Str; + using Str = Genode::String; Str address((char const*)ip4addr_ntoa(netif_ip4_addr(netif))); Str netmask((char const*)ip4addr_ntoa(netif_ip4_netmask(netif))); Str gateway((char const*)ip4addr_ntoa(netif_ip4_gw(netif))); diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index b0dab63e2f..cea40872a2 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -39,11 +39,10 @@ extern "C" { using namespace Vfs; - typedef Vfs::File_io_service::Read_result Read_result; - typedef Vfs::File_io_service::Write_result Write_result; - typedef Vfs::File_io_service::Sync_result Sync_result; - - typedef Genode::String<8> Socket_name; + using Read_result = Vfs::File_io_service::Read_result; + using Write_result = Vfs::File_io_service::Write_result; + using Sync_result = Vfs::File_io_service::Sync_result; + using Socket_name = Genode::String<8>; char const *get_port(char const *s) { @@ -92,15 +91,15 @@ extern "C" { struct Lwip_file_handle; struct Lwip_dir_handle; - typedef Genode::Registry Nameserver_registry; + using Nameserver_registry = Genode::Registry; #define Lwip_handle_list List class File_system; - typedef Vfs::Directory_service::Open_result Open_result; - typedef Vfs::Directory_service::Opendir_result Opendir_result; - typedef Vfs::Directory_service::Unlink_result Unlink_result; + using Open_result = Vfs::Directory_service::Open_result; + using Opendir_result = Vfs::Directory_service::Opendir_result; + using Unlink_result = Vfs::Directory_service::Unlink_result; extern "C" { static void udp_recv_callback(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); @@ -114,7 +113,7 @@ extern "C" { static void tcp_err_callback(void *arg, err_t err); } - typedef Genode::Path<24> Path; + using Path = Genode::Path<24>; enum { PORT_STRLEN_MAX = 6, /* :65536 */ @@ -298,8 +297,9 @@ struct Lwip::Lwip_file_handle final : Lwip_handle, private Lwip_handle_list::Ele Socket_dir *socket; - typedef Genode::Fifo_element Fifo_element; - typedef Genode::Fifo Fifo; + using Fifo_element = Genode::Fifo_element; + using Fifo = Genode::Fifo; + Fifo_element _read_ready_waiter { *this }; Fifo_element _io_progress_waiter { *this }; @@ -735,8 +735,8 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir }; namespace Lwip { - typedef Protocol_dir_impl Udp_proto_dir; - typedef Protocol_dir_impl Tcp_proto_dir; + using Udp_proto_dir = Protocol_dir_impl; + using Tcp_proto_dir = Protocol_dir_impl; } @@ -1105,7 +1105,7 @@ class Lwip::Tcp_socket_dir final : Genode::Entrypoint &_ep; Vfs::Env::User &_vfs_user; - typedef Genode::List Pcb_pending_list; + using Pcb_pending_list = Genode::List; Pcb_pending_list _pcb_pending { }; tcp_pcb *_pcb; @@ -1766,8 +1766,8 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, Nameserver_registry nameserver_handles { }; - typedef Genode::Fifo_element Handle_element; - typedef Genode::Fifo Handle_queue; + using Handle_element = Genode::Fifo_element; + using Handle_queue = Genode::Fifo; Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config, Lwip::Nic_netif::Wakeup_scheduler &wakeup_scheduler) diff --git a/repos/libports/src/test/libc_vfs_block/main.cc b/repos/libports/src/test/libc_vfs_block/main.cc index 3d09abc695..155c92a6d3 100644 --- a/repos/libports/src/test/libc_vfs_block/main.cc +++ b/repos/libports/src/test/libc_vfs_block/main.cc @@ -119,7 +119,7 @@ class Test::Block_device public: - typedef Genode::String<128> Path; + using Path = Genode::String<128>; class Unavailable : Genode::Exception { }; @@ -205,7 +205,7 @@ struct Test::Main Genode::Attached_rom_dataspace _config { _env, "config" }; - typedef Genode::String<128> Content; + using Content = Genode::String<128>; class Step_failed : Genode::Exception { }; diff --git a/repos/libports/src/test/netty/netty.h b/repos/libports/src/test/netty/netty.h index ba3657fbe0..b0d4b79620 100644 --- a/repos/libports/src/test/netty/netty.h +++ b/repos/libports/src/test/netty/netty.h @@ -56,7 +56,7 @@ static inline void print(Genode::Output &output, sockaddr_in const &addr) namespace Netty { - typedef Genode::String<32> String; + using String = Genode::String<32>; struct Test; } diff --git a/repos/os/include/audio_in_session/capability.h b/repos/os/include/audio_in_session/capability.h index 1d6302a72a..2239a6cb1c 100644 --- a/repos/os/include/audio_in_session/capability.h +++ b/repos/os/include/audio_in_session/capability.h @@ -23,7 +23,7 @@ namespace Audio_in { * because this file relies on the 'Audio_in::Session_capability' type. */ class Session; - typedef Genode::Capability Session_capability; + using Session_capability = Genode::Capability; } #endif /* _INCLUDE__AUDIO_IN_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/audio_out_session/capability.h b/repos/os/include/audio_out_session/capability.h index f29c7bd233..ebca85ced1 100644 --- a/repos/os/include/audio_out_session/capability.h +++ b/repos/os/include/audio_out_session/capability.h @@ -25,7 +25,7 @@ namespace Audio_out { * because this file relies on the 'Audio_out::Session_capability' type. */ class Session; - typedef Genode::Capability Session_capability; + using Session_capability = Genode::Capability; } #endif /* _INCLUDE__AUDIO_OUT_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/blit/painter.h b/repos/os/include/blit/painter.h index b807b3b38c..73423ab8ae 100644 --- a/repos/os/include/blit/painter.h +++ b/repos/os/include/blit/painter.h @@ -20,8 +20,8 @@ struct Blit_painter { - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; template diff --git a/repos/os/include/block/request.h b/repos/os/include/block/request.h index 64f85e673a..77045f9a55 100644 --- a/repos/os/include/block/request.h +++ b/repos/os/include/block/request.h @@ -20,10 +20,10 @@ namespace Block { - typedef Genode::uint64_t block_number_t; - typedef Genode::size_t block_count_t; - typedef Genode::off_t off_t; - typedef Genode::uint64_t seek_off_t; + using block_number_t = Genode::uint64_t; + using block_count_t = Genode::size_t; + using off_t = Genode::off_t; + using seek_off_t = Genode::uint64_t; struct Operation; struct Request; diff --git a/repos/os/include/block/request_stream.h b/repos/os/include/block/request_stream.h index af02dbae8b..95a00b1642 100644 --- a/repos/os/include/block/request_stream.h +++ b/repos/os/include/block/request_stream.h @@ -111,7 +111,7 @@ class Block::Request_stream : Genode::Noncopyable Packet_stream_tx::Rpc_object _tx; - typedef Genode::Packet_stream_sink Tx_sink; + using Tx_sink = Genode::Packet_stream_sink; Payload const _payload; @@ -182,7 +182,7 @@ class Block::Request_stream : Genode::Noncopyable if (!tx_sink.packet_avail()) return; - typedef Block::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Block::Packet_descriptor; Packet_descriptor const packet = tx_sink.peek_packet(); @@ -261,7 +261,7 @@ class Block::Request_stream : Genode::Noncopyable return; } - typedef Block::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Block::Packet_descriptor; Packet_descriptor::Payload payload { .offset = request.offset, .bytes = request.operation.count * _block_size }; diff --git a/repos/os/include/block_session/block_session.h b/repos/os/include/block_session/block_session.h index 8163c1489b..a3ef53fcc5 100644 --- a/repos/os/include/block_session/block_session.h +++ b/repos/os/include/block_session/block_session.h @@ -26,7 +26,7 @@ namespace Block { * * \deprecated use block_number_t instead */ - typedef Genode::uint64_t sector_t; + using sector_t = Genode::uint64_t; class Packet_descriptor; struct Session; @@ -55,7 +55,7 @@ class Block::Packet_descriptor : public Genode::Packet_descriptor */ enum Alignment { PACKET_ALIGNMENT = 11 }; - typedef Request::Tag Tag; + using Tag = Request::Tag; /** * Payload location within the packet stream @@ -161,13 +161,13 @@ struct Block::Session : public Genode::Session { enum { TX_QUEUE_SIZE = 256 }; - typedef Genode::Packet_stream_policy Tx_policy; + using Tx_policy = Genode::Packet_stream_policy; - typedef Packet_stream_tx::Channel Tx; + using Tx = Packet_stream_tx::Channel; - typedef Request::Tag Tag; + using Tag = Request::Tag; struct Info { diff --git a/repos/os/include/block_session/capability.h b/repos/os/include/block_session/capability.h index 8816bdfdfc..8001c59e78 100644 --- a/repos/os/include/block_session/capability.h +++ b/repos/os/include/block_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Block { typedef Genode::Capability Session_capability; } +namespace Block { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__BLOCK_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/block_session/connection.h b/repos/os/include/block_session/connection.h index 4c4e9f6574..4c3d541fe2 100644 --- a/repos/os/include/block_session/connection.h +++ b/repos/os/include/block_session/connection.h @@ -44,7 +44,7 @@ struct Block::Connection : Genode::Connection, Session_client class Job; - typedef Genode::size_t size_t; + using size_t = Genode::size_t; private: @@ -53,14 +53,14 @@ struct Block::Connection : Genode::Connection, Session_client * template argument but falls back to 'Job' if no template argument * is given. */ - template struct Fallback { typedef T Type; }; - template struct Fallback { typedef FB Type; }; + template struct Fallback { using Type = T; }; + template struct Fallback { using Type = FB; }; - typedef typename Fallback::Type _JOB; + using _JOB = typename Fallback::Type; - typedef Genode::Id_space<_JOB> Tag_id_space; + using Tag_id_space = Genode::Id_space<_JOB>; - typedef Packet_descriptor::Payload Payload; + using Payload = Packet_descriptor::Payload; public: diff --git a/repos/os/include/decorator/types.h b/repos/os/include/decorator/types.h index 9fe7097d29..cd5c0c6a34 100644 --- a/repos/os/include/decorator/types.h +++ b/repos/os/include/decorator/types.h @@ -27,11 +27,10 @@ namespace Decorator { - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Rect Rect; - - typedef Genode::Dirty_rect Dirty_rect; + using Point = Genode::Surface_base::Point; + using Area = Genode::Surface_base::Area; + using Rect = Genode::Surface_base::Rect; + using Dirty_rect = Genode::Dirty_rect; using Genode::size_t; using Genode::Color; diff --git a/repos/os/include/decorator/window.h b/repos/os/include/decorator/window.h index 023c437054..fea4b34a33 100644 --- a/repos/os/include/decorator/window.h +++ b/repos/os/include/decorator/window.h @@ -29,8 +29,8 @@ namespace Decorator { class Canvas_base; class Window_base; - typedef Genode::List > Abandoned_windows; - typedef Genode::List > Reversed_windows; + using Abandoned_windows = Genode::List >; + using Reversed_windows = Genode::List >; } @@ -38,7 +38,7 @@ class Decorator::Window_base : private Genode::List_model::Element { public: - typedef Gui::Session::View_handle View_handle; + using View_handle = Gui::Session::View_handle; struct Border { diff --git a/repos/os/include/file_system/listener.h b/repos/os/include/file_system/listener.h index bc68c040fd..ed4708cf78 100644 --- a/repos/os/include/file_system/listener.h +++ b/repos/os/include/file_system/listener.h @@ -22,7 +22,7 @@ namespace File_system { - typedef ::File_system::Session_rpc_object::Tx::Sink Sink; + using Sink = ::File_system::Session_rpc_object::Tx::Sink; class Listener : public Genode::List::Element { diff --git a/repos/os/include/file_system/node.h b/repos/os/include/file_system/node.h index 6779bea785..527b7c6923 100644 --- a/repos/os/include/file_system/node.h +++ b/repos/os/include/file_system/node.h @@ -27,7 +27,7 @@ namespace File_system { Genode::List _listeners { }; - typedef Listener::Version Version; + using Version = Listener::Version; Version _curr_version { 0 }; diff --git a/repos/os/include/file_system_session/capability.h b/repos/os/include/file_system_session/capability.h index fc593cb87f..66a0e4d40c 100644 --- a/repos/os/include/file_system_session/capability.h +++ b/repos/os/include/file_system_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace File_system { typedef Genode::Capability Session_capability; } +namespace File_system { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__FILE_SYSTEM_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/file_system_session/file_system_session.h b/repos/os/include/file_system_session/file_system_session.h index 0316539b34..29a8d1a8aa 100644 --- a/repos/os/include/file_system_session/file_system_session.h +++ b/repos/os/include/file_system_session/file_system_session.h @@ -26,7 +26,7 @@ namespace File_system { struct Node { - typedef Genode::Id_space::Id Id; + using Id = Genode::Id_space::Id; }; struct File : Node @@ -61,11 +61,11 @@ namespace File_system { }; }; - typedef Node::Id Node_handle; - typedef File::Id File_handle; - typedef Directory::Id Dir_handle; - typedef Symlink::Id Symlink_handle; - typedef Watch::Id Watch_handle; + using Node_handle = Node::Id; + using File_handle = File::Id; + using Dir_handle = Directory::Id; + using Symlink_handle = Symlink::Id; + using Watch_handle = Watch::Id; enum class Node_type { DIRECTORY, @@ -83,8 +83,8 @@ namespace File_system { using Genode::size_t; - typedef Genode::uint64_t seek_off_t; - typedef Genode::uint64_t file_size_t; + using seek_off_t = Genode::uint64_t; + using file_size_t = Genode::uint64_t; struct Timestamp { @@ -106,8 +106,8 @@ namespace File_system { Genode::int64_t value; }; - typedef Genode::Out_of_ram Out_of_ram; - typedef Genode::Out_of_caps Out_of_caps; + using Out_of_ram = Genode::Out_of_ram; + using Out_of_caps = Genode::Out_of_caps; class Packet_descriptor; @@ -130,8 +130,8 @@ namespace File_system { */ enum { SEEK_TAIL = ~0ULL }; - typedef Genode::Rpc_in_buffer Name; - typedef Genode::Rpc_in_buffer Path; + using Name = Genode::Rpc_in_buffer; + using Path = Genode::Rpc_in_buffer; struct Status; struct Control; @@ -318,11 +318,11 @@ struct File_system::Session : public Genode::Session { enum { TX_QUEUE_SIZE = 32 }; - typedef Genode::Packet_stream_policy Tx_policy; + using Tx_policy = Genode::Packet_stream_policy; - typedef Packet_stream_tx::Channel Tx; + using Tx = Packet_stream_tx::Channel; /** * \noapi diff --git a/repos/os/include/framebuffer_session/capability.h b/repos/os/include/framebuffer_session/capability.h index 6640c88e8f..5e878e41b0 100644 --- a/repos/os/include/framebuffer_session/capability.h +++ b/repos/os/include/framebuffer_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Framebuffer { typedef Genode::Capability Session_capability; } +namespace Framebuffer { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__FRAMEBUFFER_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/framebuffer_session/framebuffer_session.h b/repos/os/include/framebuffer_session/framebuffer_session.h index d17be099c7..3f45ab9410 100644 --- a/repos/os/include/framebuffer_session/framebuffer_session.h +++ b/repos/os/include/framebuffer_session/framebuffer_session.h @@ -57,7 +57,7 @@ struct Framebuffer::Session : Genode::Session */ static constexpr unsigned CAP_QUOTA = 3; - typedef Session_client Client; + using Client = Session_client; virtual ~Session() { } diff --git a/repos/os/include/gpio/config.h b/repos/os/include/gpio/config.h index cb18716870..20b796c634 100644 --- a/repos/os/include/gpio/config.h +++ b/repos/os/include/gpio/config.h @@ -55,7 +55,7 @@ void Gpio::process_config(Genode::Xml_node const &config, Gpio::Driver &driver) return; } - typedef Genode::String<2> Mode; + using Mode = Genode::String<2>; Mode const mode = gpio_node.attribute_value("mode", Mode()); unsigned value = 0; diff --git a/repos/os/include/gpio_session/capability.h b/repos/os/include/gpio_session/capability.h index e9807dd1b7..a34f31f756 100644 --- a/repos/os/include/gpio_session/capability.h +++ b/repos/os/include/gpio_session/capability.h @@ -18,6 +18,6 @@ #include #include -namespace Gpio { typedef Genode::Capability Session_capability; } +namespace Gpio { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__GPIO_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/gpu_session/capability.h b/repos/os/include/gpu_session/capability.h index a4ebe0a1f2..d403eb190a 100644 --- a/repos/os/include/gpu_session/capability.h +++ b/repos/os/include/gpu_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Gpu { typedef Genode::Capability Session_capability; } +namespace Gpu { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__GPU_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/gui_session/capability.h b/repos/os/include/gui_session/capability.h index a4c85e6a93..bf0db68457 100644 --- a/repos/os/include/gui_session/capability.h +++ b/repos/os/include/gui_session/capability.h @@ -17,9 +17,6 @@ #include #include -namespace Gui { - - typedef Genode::Capability Session_capability; -} +namespace Gui { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__GUI_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/i2c_session/capability.h b/repos/os/include/i2c_session/capability.h index 602446b742..4ee9c539ca 100644 --- a/repos/os/include/i2c_session/capability.h +++ b/repos/os/include/i2c_session/capability.h @@ -18,6 +18,6 @@ #include #include -namespace I2c { typedef Genode::Capability Session_capability; } +namespace I2c { using Session_capability = Genode::Capability; } #endif /*_INCLUDE__I2C_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/init/child_policy.h b/repos/os/include/init/child_policy.h index 544b0730c9..bb26dd99fc 100644 --- a/repos/os/include/init/child_policy.h +++ b/repos/os/include/init/child_policy.h @@ -59,7 +59,7 @@ class Init::Child_policy_provide_rom_file Session_label const _module_name; - typedef Local_service Service; + using Service = Local_service; Service::Single_session_factory _session_factory { _session }; Service _service { _session_factory }; diff --git a/repos/os/include/input/event.h b/repos/os/include/input/event.h index 9893017317..72634c5d7f 100644 --- a/repos/os/include/input/event.h +++ b/repos/os/include/input/event.h @@ -21,7 +21,7 @@ namespace Input { - typedef Genode::Codepoint Codepoint; + using Codepoint = Genode::Codepoint; struct Touch_id { unsigned value; }; diff --git a/repos/os/include/input/event_queue.h b/repos/os/include/input/event_queue.h index 1f4883428e..94f6e753d7 100644 --- a/repos/os/include/input/event_queue.h +++ b/repos/os/include/input/event_queue.h @@ -35,7 +35,7 @@ class Input::Event_queue */ enum { QUEUE_SIZE = 512U }; - typedef Genode::Ring_buffer Ring_buffer; + using Ring_buffer = Genode::Ring_buffer; private: @@ -47,7 +47,7 @@ class Input::Event_queue public: - typedef Ring_buffer::Overflow Overflow; + using Overflow = Ring_buffer::Overflow; void enabled(bool enabled) { _enabled = enabled; } diff --git a/repos/os/include/input/keycodes.h b/repos/os/include/input/keycodes.h index 1fe9e23229..481d56d385 100644 --- a/repos/os/include/input/keycodes.h +++ b/repos/os/include/input/keycodes.h @@ -484,7 +484,7 @@ namespace Input { return "KEY_UNKNOWN"; } - typedef Genode::String<22> Key_name; + using Key_name = Genode::String<22>; /** * Return key code for name (linear search) diff --git a/repos/os/include/input_session/capability.h b/repos/os/include/input_session/capability.h index 66609e9e20..537479a71a 100644 --- a/repos/os/include/input_session/capability.h +++ b/repos/os/include/input_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Input { typedef Genode::Capability Session_capability; } +namespace Input { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__INPUT_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/mixer/channel.h b/repos/os/include/mixer/channel.h index bdbf93ac3e..da814c9dc1 100644 --- a/repos/os/include/mixer/channel.h +++ b/repos/os/include/mixer/channel.h @@ -25,12 +25,12 @@ struct Mixer::Channel { struct Invalid_channel { }; - typedef Genode::String<128> Label; - typedef Genode::String<32> Name; + using Label = Genode::String<128>; + using Name = Genode::String<32>; - typedef enum { INVALID = -1, LEFT, RIGHT, MAX_CHANNELS } Number; - typedef enum { TYPE_INVALID, INPUT, OUTPUT } Type; - typedef enum { MIN = 0, MAX = 100 } Volume_level; + enum Number { INVALID = -1, LEFT, RIGHT, MAX_CHANNELS }; + enum Type { TYPE_INVALID, INPUT, OUTPUT }; + enum Volume_level { MIN = 0, MAX = 100 }; Type type { TYPE_INVALID }; Number number { INVALID }; @@ -41,7 +41,7 @@ struct Mixer::Channel Channel(Genode::Xml_node const &node) { - typedef Genode::String<8> Type; + using Type = Genode::String<8>; Type const type_name = node.attribute_value("type", Type()); if (type_name == "input") type = INPUT; diff --git a/repos/os/include/nic/packet_allocator.h b/repos/os/include/nic/packet_allocator.h index 7cbb077678..a562778bea 100644 --- a/repos/os/include/nic/packet_allocator.h +++ b/repos/os/include/nic/packet_allocator.h @@ -47,7 +47,7 @@ struct Nic::Packet_allocator : Genode::Packet_allocator OFFSET_PACKET_SIZE = DEFAULT_PACKET_SIZE - OFFSET, }; - typedef Genode::size_t size_t; + using size_t = Genode::size_t; /** * Constructor diff --git a/repos/os/include/nic_session/capability.h b/repos/os/include/nic_session/capability.h index 776360a336..ee390952b4 100644 --- a/repos/os/include/nic_session/capability.h +++ b/repos/os/include/nic_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Nic { typedef Genode::Capability Session_capability; } +namespace Nic { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__NIC_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/nic_session/nic_session.h b/repos/os/include/nic_session/nic_session.h index 7967c05e19..3074b85140 100644 --- a/repos/os/include/nic_session/nic_session.h +++ b/repos/os/include/nic_session/nic_session.h @@ -31,7 +31,7 @@ namespace Nic { using Genode::Packet_stream_sink; using Genode::Packet_stream_source; - typedef Genode::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Genode::Packet_descriptor; } @@ -60,11 +60,11 @@ struct Nic::Session : Genode::Session * The acknowledgement queue has always the same size as the submit * queue. We access the packet content as a char pointer. */ - typedef Genode::Packet_stream_policy Policy; + using Policy = Genode::Packet_stream_policy; - typedef Packet_stream_tx::Channel Tx; - typedef Packet_stream_rx::Channel Rx; + using Tx = Packet_stream_tx::Channel; + using Rx = Packet_stream_rx::Channel; /** * \noapi diff --git a/repos/os/include/nitpicker_gfx/box_painter.h b/repos/os/include/nitpicker_gfx/box_painter.h index 8f9c3ed33a..dfffdb98d3 100644 --- a/repos/os/include/nitpicker_gfx/box_painter.h +++ b/repos/os/include/nitpicker_gfx/box_painter.h @@ -19,7 +19,7 @@ struct Box_painter { - typedef Genode::Surface_base::Rect Rect; + using Rect = Genode::Surface_base::Rect; /** * Draw filled box diff --git a/repos/os/include/nitpicker_gfx/glyph_painter.h b/repos/os/include/nitpicker_gfx/glyph_painter.h index 511e1ecda3..3e4b6fb041 100644 --- a/repos/os/include/nitpicker_gfx/glyph_painter.h +++ b/repos/os/include/nitpicker_gfx/glyph_painter.h @@ -36,7 +36,7 @@ struct Glyph_painter int decimal() const { return value >> 8; } }; - typedef Genode::Point Position; + using Position = Genode::Point; struct Glyph @@ -106,7 +106,7 @@ struct Glyph_painter PT *dst_column = dst + dst_x + dst_line_len*(dst_y1 + clipped_from_top); - typedef Glyph::Opacity Opacity; + using Opacity = Glyph::Opacity; Opacity const *glyph_column = glyph.values + glyph_x + glyph_line_len*clipped_from_top; diff --git a/repos/os/include/nitpicker_gfx/text_painter.h b/repos/os/include/nitpicker_gfx/text_painter.h index e76702d213..177490532e 100644 --- a/repos/os/include/nitpicker_gfx/text_painter.h +++ b/repos/os/include/nitpicker_gfx/text_painter.h @@ -21,14 +21,13 @@ struct Text_painter { - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Area Area; - typedef Genode::Surface_base::Rect Rect; - typedef Genode::Codepoint Codepoint; - - typedef Glyph_painter::Fixpoint_number Fixpoint_number; - typedef Glyph_painter::Position Position; - typedef Glyph_painter::Glyph Glyph; + using Point = Genode::Surface_base::Point; + using Area = Genode::Surface_base::Area; + using Rect = Genode::Surface_base::Rect; + using Codepoint = Genode::Codepoint; + using Fixpoint_number = Glyph_painter::Fixpoint_number; + using Position = Glyph_painter::Position; + using Glyph = Glyph_painter::Glyph; /*************************************** diff --git a/repos/os/include/nitpicker_gfx/texture_painter.h b/repos/os/include/nitpicker_gfx/texture_painter.h index c4545924f4..ed6d3fdf48 100644 --- a/repos/os/include/nitpicker_gfx/texture_painter.h +++ b/repos/os/include/nitpicker_gfx/texture_painter.h @@ -39,8 +39,8 @@ struct Texture_painter }; - typedef Genode::Surface_base::Point Point; - typedef Genode::Surface_base::Rect Rect; + using Point = Genode::Surface_base::Point; + using Rect = Genode::Surface_base::Rect; template diff --git a/repos/os/include/nitpicker_gfx/tff_font.h b/repos/os/include/nitpicker_gfx/tff_font.h index 4569a9e7f1..b7eddd8093 100644 --- a/repos/os/include/nitpicker_gfx/tff_font.h +++ b/repos/os/include/nitpicker_gfx/tff_font.h @@ -54,11 +54,10 @@ class Tff_font : public Text_painter::Font private: - typedef Genode::int32_t int32_t; - - typedef Text_painter::Codepoint Codepoint; - typedef Text_painter::Area Area; - typedef Text_painter::Glyph Glyph; + using int32_t = Genode::int32_t; + using Codepoint = Text_painter::Codepoint; + using Area = Text_painter::Area; + using Glyph = Text_painter::Glyph; Glyph_buffer &_buf; diff --git a/repos/os/include/os/dynamic_rom_session.h b/repos/os/include/os/dynamic_rom_session.h index e3cd60e069..a6342e1db6 100644 --- a/repos/os/include/os/dynamic_rom_session.h +++ b/repos/os/include/os/dynamic_rom_session.h @@ -44,7 +44,7 @@ class Genode::Dynamic_rom_session : public Rpc_object { public: - typedef String<64> Node_name; + using Node_name = String<64>; private: diff --git a/repos/os/include/os/handle_registry.h b/repos/os/include/os/handle_registry.h index c60e1b6af4..627770cf4c 100644 --- a/repos/os/include/os/handle_registry.h +++ b/repos/os/include/os/handle_registry.h @@ -39,7 +39,7 @@ class Genode::Handle public: - typedef T Type; + using Type = T; Handle() { } diff --git a/repos/os/include/os/packet_stream.h b/repos/os/include/os/packet_stream.h index 4b8114958d..20bbcdec20 100644 --- a/repos/os/include/os/packet_stream.h +++ b/repos/os/include/os/packet_stream.h @@ -96,8 +96,8 @@ namespace Genode { /** * Default configuration for packet-descriptor queues */ - typedef Packet_stream_policy - Default_packet_stream_policy; + using Default_packet_stream_policy = + Packet_stream_policy; template class Packet_stream_source; @@ -172,7 +172,7 @@ class Genode::Packet_descriptor_queue public: - typedef PACKET_DESCRIPTOR Packet_descriptor; + using Packet_descriptor = PACKET_DESCRIPTOR; enum Role { PRODUCER, CONSUMER }; @@ -575,15 +575,11 @@ template struct Genode::Packet_stream_policy { - typedef CONTENT_TYPE Content_type; + using Content_type = CONTENT_TYPE; + using Packet_descriptor = PACKET_DESCRIPTOR; - typedef PACKET_DESCRIPTOR Packet_descriptor; - - typedef Packet_descriptor_queue - Submit_queue; - - typedef Packet_descriptor_queue - Ack_queue; + using Submit_queue = Packet_descriptor_queue; + using Ack_queue = Packet_descriptor_queue; }; @@ -595,13 +591,13 @@ class Genode::Packet_stream_source : private Packet_stream_base { public: - typedef typename POLICY::Packet_descriptor Packet_descriptor; + using Packet_descriptor = typename POLICY::Packet_descriptor; private: - typedef typename POLICY::Submit_queue Submit_queue; - typedef typename POLICY::Ack_queue Ack_queue; - typedef typename POLICY::Content_type Content_type; + using Submit_queue = typename POLICY::Submit_queue; + using Ack_queue = typename POLICY::Ack_queue; + using Content_type = typename POLICY::Content_type; enum { PACKET_ALIGNMENT = POLICY::Packet_descriptor::PACKET_ALIGNMENT }; @@ -846,10 +842,10 @@ class Genode::Packet_stream_sink : private Packet_stream_base { public: - typedef typename POLICY::Submit_queue Submit_queue; - typedef typename POLICY::Ack_queue Ack_queue; - typedef typename POLICY::Packet_descriptor Packet_descriptor; - typedef typename POLICY::Content_type Content_type; + using Submit_queue = typename POLICY::Submit_queue; + using Ack_queue = typename POLICY::Ack_queue; + using Packet_descriptor = typename POLICY::Packet_descriptor; + using Content_type = typename POLICY::Content_type; /** * Exception types diff --git a/repos/os/include/os/pixel_alpha8.h b/repos/os/include/os/pixel_alpha8.h index b72732add3..f3e051b14c 100644 --- a/repos/os/include/os/pixel_alpha8.h +++ b/repos/os/include/os/pixel_alpha8.h @@ -18,9 +18,8 @@ namespace Genode { - typedef Genode::Pixel_rgba - Pixel_alpha8; + using Pixel_alpha8 = Genode::Pixel_rgba; /* diff --git a/repos/os/include/os/pixel_rgb565.h b/repos/os/include/os/pixel_rgb565.h index eee3d745f1..5896b1d8da 100644 --- a/repos/os/include/os/pixel_rgb565.h +++ b/repos/os/include/os/pixel_rgb565.h @@ -18,9 +18,8 @@ namespace Genode { - typedef Pixel_rgba - Pixel_rgb565; + using Pixel_rgb565 = Pixel_rgba; template <> diff --git a/repos/os/include/os/pixel_rgb888.h b/repos/os/include/os/pixel_rgb888.h index e318b66bf2..3f01148b59 100644 --- a/repos/os/include/os/pixel_rgb888.h +++ b/repos/os/include/os/pixel_rgb888.h @@ -18,9 +18,8 @@ namespace Genode { - typedef Pixel_rgba - Pixel_rgb888; + using Pixel_rgb888 = Pixel_rgba; template <> inline Pixel_rgb888 Pixel_rgb888::avr(Pixel_rgb888 p1, Pixel_rgb888 p2) diff --git a/repos/os/include/os/reporter.h b/repos/os/include/os/reporter.h index a0435105b3..fcf1be36c0 100644 --- a/repos/os/include/os/reporter.h +++ b/repos/os/include/os/reporter.h @@ -31,7 +31,7 @@ class Genode::Reporter { public: - typedef String<100> Name; + using Name = String<100>; private: @@ -152,8 +152,8 @@ class Genode::Expanding_reporter { public: - typedef Session_label Label; - typedef String<64> Node_type; + using Label = Session_label; + using Node_type = String<64>; struct Initial_buffer_size { size_t value; }; diff --git a/repos/os/include/os/ring_buffer.h b/repos/os/include/os/ring_buffer.h index c8bdfc9f86..3160361b36 100644 --- a/repos/os/include/os/ring_buffer.h +++ b/repos/os/include/os/ring_buffer.h @@ -51,9 +51,9 @@ struct Genode::Ring_buffer_unsynchronized struct Genode::Ring_buffer_synchronized { - typedef Genode::Semaphore Sem; - typedef Genode::Mutex Mutex; - typedef Genode::Mutex::Guard Mutex_guard; + using Sem = Genode::Semaphore; + using Mutex = Genode::Mutex; + using Mutex_guard = Genode::Mutex::Guard; }; diff --git a/repos/os/include/os/session_policy.h b/repos/os/include/os/session_policy.h index 70cc2eff90..a374c409c9 100644 --- a/repos/os/include/os/session_policy.h +++ b/repos/os/include/os/session_policy.h @@ -67,7 +67,7 @@ struct Genode::Xml_node_label_score label_match = node.attribute_value("label", String()) == label; if (prefix_present) { - typedef String Prefix; + using Prefix = String; Prefix const prefix = node.attribute_value("label_prefix", Prefix()); if (!strcmp(label.string(), prefix.string(), prefix.length() - 1)) @@ -75,7 +75,7 @@ struct Genode::Xml_node_label_score } if (suffix_present) { - typedef String Suffix; + using Suffix = String; Suffix const suffix = node.attribute_value("label_suffix", Suffix()); if (label.length() >= suffix.length()) { diff --git a/repos/os/include/os/session_requester.h b/repos/os/include/os/session_requester.h index f798eba271..846f26fdd6 100644 --- a/repos/os/include/os/session_requester.h +++ b/repos/os/include/os/session_requester.h @@ -45,7 +45,7 @@ class Genode::Session_requester } } _content_producer { _id_space }; - typedef Local_service Service; + using Service = Local_service; Dynamic_rom_session _session; Service::Single_session_factory _factory { _session }; @@ -53,7 +53,7 @@ class Genode::Session_requester public: - typedef String<32> Rom_name; + using Rom_name = String<32>; static Rom_name rom_name() { return "session_requests"; } diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index fce8d68359..abe963e1db 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -79,7 +79,7 @@ struct Genode::Directory : Noncopyable, Interface print(out, ")"); } - typedef String Name; + using Name = String; Name name() const { return Name(Cstring(_dirent.name.buf)); } @@ -92,7 +92,7 @@ struct Genode::Directory : Noncopyable, Interface enum { MAX_PATH_LEN = 256 }; - typedef String Path; + using Path = String; static Path join(Path const &x, Path const &y) { @@ -453,7 +453,7 @@ struct Genode::File : Noncopyable, Interface struct Truncated_during_read : Exception { }; - typedef Directory::Path Path; + using Path = Directory::Path; }; @@ -676,10 +676,9 @@ class Genode::File_content public: - typedef Directory::Nonexistent_file Nonexistent_file; - typedef File::Truncated_during_read Truncated_during_read; - - typedef Directory::Path Path; + using Nonexistent_file = Directory::Nonexistent_file; + using Truncated_during_read = File::Truncated_during_read; + using Path = Directory::Path; /** * Constructor diff --git a/repos/os/include/packet_stream_rx/client.h b/repos/os/include/packet_stream_rx/client.h index 390efd915a..d477af484a 100644 --- a/repos/os/include/packet_stream_rx/client.h +++ b/repos/os/include/packet_stream_rx/client.h @@ -30,12 +30,12 @@ class Packet_stream_rx::Client : public Genode::Rpc_client /* * Type shortcuts */ - typedef Genode::Rpc_client Base; - typedef typename Base::Rpc_dataspace Rpc_dataspace; - typedef typename Base::Rpc_packet_avail Rpc_packet_avail; - typedef typename Base::Rpc_ready_to_ack Rpc_ready_to_ack; - typedef typename Base::Rpc_ready_to_submit Rpc_ready_to_submit; - typedef typename Base::Rpc_ack_avail Rpc_ack_avail; + using Base = Genode::Rpc_client; + using Rpc_dataspace = typename Base::Rpc_dataspace; + using Rpc_packet_avail = typename Base::Rpc_packet_avail; + using Rpc_ready_to_ack = typename Base::Rpc_ready_to_ack; + using Rpc_ready_to_submit = typename Base::Rpc_ready_to_submit; + using Rpc_ack_avail = typename Base::Rpc_ack_avail; public: diff --git a/repos/os/include/packet_stream_rx/packet_stream_rx.h b/repos/os/include/packet_stream_rx/packet_stream_rx.h index 17c93743fb..fb02b0aef5 100644 --- a/repos/os/include/packet_stream_rx/packet_stream_rx.h +++ b/repos/os/include/packet_stream_rx/packet_stream_rx.h @@ -23,8 +23,8 @@ namespace Packet_stream_rx { template struct Channel; } template struct Packet_stream_rx::Channel : Genode::Interface { - typedef Genode::Packet_stream_source Source; - typedef Genode::Packet_stream_sink Sink; + using Source = Genode::Packet_stream_source; + using Sink = Genode::Packet_stream_sink; /** * Request reception interface diff --git a/repos/os/include/packet_stream_tx/client.h b/repos/os/include/packet_stream_tx/client.h index 9a5777b57f..aa2117176c 100644 --- a/repos/os/include/packet_stream_tx/client.h +++ b/repos/os/include/packet_stream_tx/client.h @@ -28,12 +28,12 @@ class Packet_stream_tx::Client : public Genode::Rpc_client /* * Type shortcuts */ - typedef Genode::Rpc_client Base; - typedef typename Base::Rpc_dataspace Rpc_dataspace; - typedef typename Base::Rpc_packet_avail Rpc_packet_avail; - typedef typename Base::Rpc_ready_to_ack Rpc_ready_to_ack; - typedef typename Base::Rpc_ready_to_submit Rpc_ready_to_submit; - typedef typename Base::Rpc_ack_avail Rpc_ack_avail; + using Base = Genode::Rpc_client; + using Rpc_dataspace = typename Base::Rpc_dataspace; + using Rpc_packet_avail = typename Base::Rpc_packet_avail; + using Rpc_ready_to_ack = typename Base::Rpc_ready_to_ack; + using Rpc_ready_to_submit = typename Base::Rpc_ready_to_submit; + using Rpc_ack_avail = typename Base::Rpc_ack_avail; /** * Packet-stream source diff --git a/repos/os/include/packet_stream_tx/packet_stream_tx.h b/repos/os/include/packet_stream_tx/packet_stream_tx.h index 49de7b1a28..6c1e8fbdb5 100644 --- a/repos/os/include/packet_stream_tx/packet_stream_tx.h +++ b/repos/os/include/packet_stream_tx/packet_stream_tx.h @@ -23,8 +23,8 @@ namespace Packet_stream_tx { template struct Channel; } template struct Packet_stream_tx::Channel : Genode::Interface { - typedef Genode::Packet_stream_source Source; - typedef Genode::Packet_stream_sink Sink; + using Source = Genode::Packet_stream_source; + using Sink = Genode::Packet_stream_sink; /** * Request transmission interface diff --git a/repos/os/include/platform_session/capability.h b/repos/os/include/platform_session/capability.h index 91927d0c50..9399fde2df 100644 --- a/repos/os/include/platform_session/capability.h +++ b/repos/os/include/platform_session/capability.h @@ -17,6 +17,6 @@ #include #include -namespace Platform { typedef Genode::Capability Session_capability; } +namespace Platform { using Session_capability = Genode::Capability; } #endif /* _INCLUDE__PLATFORM_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/platform_session/device.h b/repos/os/include/platform_session/device.h index 42ae748454..542ac5dd3f 100644 --- a/repos/os/include/platform_session/device.h +++ b/repos/os/include/platform_session/device.h @@ -32,11 +32,11 @@ class Platform::Device : Interface, Noncopyable struct Irq; struct Io_port_range; - typedef Platform::Session::Device_name Name; + using Name = Platform::Session::Device_name; private: - typedef Device_interface::Range Range; + using Range = Device_interface::Range; ::Platform::Connection &_platform; diff --git a/repos/os/include/platform_session/platform_session.h b/repos/os/include/platform_session/platform_session.h index 1730dddf85..b08d9ec035 100644 --- a/repos/os/include/platform_session/platform_session.h +++ b/repos/os/include/platform_session/platform_session.h @@ -61,7 +61,7 @@ struct Platform::Session : Genode::Session virtual ~Session() { } - typedef String<64> Device_name; + using Device_name = String<64>; /** * Request ROM session containing the information about available devices. diff --git a/repos/os/include/ram_fs/chunk.h b/repos/os/include/ram_fs/chunk.h index acbcd65e90..e306352f06 100644 --- a/repos/os/include/ram_fs/chunk.h +++ b/repos/os/include/ram_fs/chunk.h @@ -188,7 +188,7 @@ class File_system::Chunk_index : public Chunk_base { public: - typedef ENTRY_TYPE Entry; + using Entry = ENTRY_TYPE; enum { ENTRY_SIZE = ENTRY_TYPE::SIZE, SIZE = ENTRY_SIZE*NUM_ENTRIES }; @@ -279,7 +279,7 @@ class File_system::Chunk_index : public Chunk_base * operand type is const or non-const Entry. The correct type * is embedded as a trait in the 'FUNC' functor type. */ - typedef typename FUNC::Entry Const_qualified_entry; + using Const_qualified_entry = typename FUNC::Entry; auto data_ptr = range_ptr.start; size_t len = range_ptr.num_bytes; @@ -319,7 +319,7 @@ class File_system::Chunk_index : public Chunk_base struct Write_func { - typedef ENTRY_TYPE Entry; + using Entry = ENTRY_TYPE; static Entry &lookup(Chunk_index &chunk, unsigned i) { return chunk._entry_for_writing(i); } @@ -332,7 +332,7 @@ class File_system::Chunk_index : public Chunk_base struct Read_func { - typedef ENTRY_TYPE const Entry; + using Entry = ENTRY_TYPE const; static Entry &lookup(Chunk_index const &chunk, unsigned i) { return chunk._entry_for_reading(i); } diff --git a/repos/os/include/report_rom/rom_module.h b/repos/os/include/report_rom/rom_module.h index e7d0a4fac4..43b7957b78 100644 --- a/repos/os/include/report_rom/rom_module.h +++ b/repos/os/include/report_rom/rom_module.h @@ -32,9 +32,9 @@ namespace Rom { class Reader; class Buffer; - typedef Genode::List Module_list; - typedef Genode::List Reader_list; - typedef Genode::List Writer_list; + using Module_list = Genode::List; + using Reader_list = Genode::List; + using Writer_list = Genode::List; } @@ -110,7 +110,7 @@ struct Rom::Module : private Module_list::Element, Readable_module using Module_list::Element::next; - typedef Genode::String<200> Name; + using Name = Genode::String<200>; struct Read_policy : Interface { diff --git a/repos/os/include/report_session/report_session.h b/repos/os/include/report_session/report_session.h index 8e964df812..20d63ad82d 100644 --- a/repos/os/include/report_session/report_session.h +++ b/repos/os/include/report_session/report_session.h @@ -62,7 +62,7 @@ struct Report::Session : Genode::Session */ static constexpr unsigned CAP_QUOTA = 3; - typedef Session_client Client; + using Client = Session_client; /** * Request the dataspace used to carry reports and responses diff --git a/repos/os/include/terminal/cell_array.h b/repos/os/include/terminal/cell_array.h index e2ae60b908..662ed2271b 100644 --- a/repos/os/include/terminal/cell_array.h +++ b/repos/os/include/terminal/cell_array.h @@ -42,7 +42,7 @@ class Cell_array CELL **_array = nullptr; bool *_line_dirty = nullptr; - typedef CELL *Char_cell_line; + using Char_cell_line = CELL *; void _clear_line(Char_cell_line line) { diff --git a/repos/os/include/trace/policy.h b/repos/os/include/trace/policy.h index c387302459..1472587e0d 100644 --- a/repos/os/include/trace/policy.h +++ b/repos/os/include/trace/policy.h @@ -14,7 +14,7 @@ #include -typedef Genode::size_t size_t; +using size_t = Genode::size_t; namespace Genode { struct Msgbuf_base; diff --git a/repos/os/include/uplink_session/capability.h b/repos/os/include/uplink_session/capability.h index d2ba45c4ad..4c5d40e833 100644 --- a/repos/os/include/uplink_session/capability.h +++ b/repos/os/include/uplink_session/capability.h @@ -18,9 +18,6 @@ #include #include -namespace Uplink { - - typedef Genode::Capability Session_capability; -} +namespace Uplink { using Session_capability = Genode::Capability; } #endif /* _UPLINK_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/uplink_session/uplink_session.h b/repos/os/include/uplink_session/uplink_session.h index 883744d719..d07aebe518 100644 --- a/repos/os/include/uplink_session/uplink_session.h +++ b/repos/os/include/uplink_session/uplink_session.h @@ -26,7 +26,7 @@ namespace Uplink { using Genode::Packet_stream_sink; using Genode::Packet_stream_source; - typedef Genode::Packet_descriptor Packet_descriptor; + using Packet_descriptor = Genode::Packet_descriptor; } @@ -55,11 +55,11 @@ struct Uplink::Session : Genode::Session * The acknowledgement queue has always the same size as the submit * queue. We access the packet content as a char pointer. */ - typedef Genode::Packet_stream_policy Policy; + using Policy = Genode::Packet_stream_policy; - typedef Packet_stream_tx::Channel Tx; - typedef Packet_stream_rx::Channel Rx; + using Tx = Packet_stream_tx::Channel; + using Rx = Packet_stream_rx::Channel; /** * \noapi diff --git a/repos/os/include/util/dirty_rect.h b/repos/os/include/util/dirty_rect.h index 2a487b1131..4c72935c94 100644 --- a/repos/os/include/util/dirty_rect.h +++ b/repos/os/include/util/dirty_rect.h @@ -31,8 +31,8 @@ class Genode::Dirty_rect { private: - typedef RECT Rect; - typedef Genode::size_t size_t; + using Rect = RECT; + using size_t = Genode::size_t; Rect _rects[NUM_RECTS]; diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index b36078fde5..a3849807f8 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -51,7 +51,7 @@ class Vfs::Dir_file_system : public File_system { struct Subdir_handle_element; - typedef Genode::Registry Subdir_handle_registry; + using Subdir_handle_registry = Genode::Registry; struct Subdir_handle_element : Subdir_handle_registry::Element { @@ -98,7 +98,7 @@ class Vfs::Dir_file_system : public File_system { struct Watch_handle_element; - typedef Genode::Registry Watch_handle_registry; + using Watch_handle_registry = Genode::Registry; struct Watch_handle_element : Watch_handle_registry::Element { @@ -156,7 +156,7 @@ class Vfs::Dir_file_system : public File_system /** * Directory name */ - typedef String Name; + using Name = String; Name const _name; /** diff --git a/repos/os/include/vfs/file_system_factory.h b/repos/os/include/vfs/file_system_factory.h index 3aae4efc16..0603551063 100644 --- a/repos/os/include/vfs/file_system_factory.h +++ b/repos/os/include/vfs/file_system_factory.h @@ -44,9 +44,9 @@ class Vfs::Global_file_system_factory : public Vfs::File_system_factory public: - typedef Genode::String<128> Fs_type_name; - typedef Genode::String<128> Node_name; - typedef Genode::String<128> Library_name; + using Fs_type_name = Genode::String<128>; + using Node_name = Genode::String<128>; + using Library_name = Genode::String<128>; struct Entry_base; diff --git a/repos/os/include/vfs/readonly_value_file_system.h b/repos/os/include/vfs/readonly_value_file_system.h index 2b8fb5b8f7..f248d46d05 100644 --- a/repos/os/include/vfs/readonly_value_file_system.h +++ b/repos/os/include/vfs/readonly_value_file_system.h @@ -29,11 +29,11 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system { public: - typedef Genode::String<64> Name; + using Name = Genode::String<64>; private: - typedef Genode::String Buffer; + using Buffer = Genode::String; Name const _file_name; @@ -75,7 +75,7 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system bool write_ready() const override { return false; } }; - typedef Genode::String<200> Config; + using Config = Genode::String<200>; Config _config(Name const &name) const { char buf[Config::capacity()] { }; @@ -84,8 +84,8 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system return Config(Genode::Cstring(buf)); } - typedef Genode::Registered Registered_watch_handle; - typedef Genode::Registry Watch_handle_registry; + using Registered_watch_handle = Genode::Registered; + using Watch_handle_registry = Genode::Registry; Watch_handle_registry _handle_registry { }; diff --git a/repos/os/include/vfs/single_file_system.h b/repos/os/include/vfs/single_file_system.h index 57fff74c9e..eae99526aa 100644 --- a/repos/os/include/vfs/single_file_system.h +++ b/repos/os/include/vfs/single_file_system.h @@ -27,7 +27,7 @@ class Vfs::Single_file_system : public File_system Node_type const _type; Node_rwx const _rwx; - typedef String<64> Filename; + using Filename = String<64>; Filename _filename { }; diff --git a/repos/os/include/vfs/types.h b/repos/os/include/vfs/types.h index 9f9037c106..fa4b90158e 100644 --- a/repos/os/include/vfs/types.h +++ b/repos/os/include/vfs/types.h @@ -36,10 +36,10 @@ namespace Vfs { using Genode::copy_cstring; using Genode::strcmp; using Genode::strlen; - typedef long long file_offset; + using file_offset = long long; using Genode::memcpy; using Genode::memset; - typedef unsigned long long file_size; + using file_size = unsigned long long; using Genode::List; using Genode::Xml_node; using Genode::Signal_context_capability; @@ -90,7 +90,7 @@ namespace Vfs { .executable = true }; } }; - typedef Genode::Path Absolute_path; + using Absolute_path = Genode::Path; struct Scanner_policy_path_element { diff --git a/repos/os/include/vfs/value_file_system.h b/repos/os/include/vfs/value_file_system.h index ba75f0c72a..b7175780b2 100644 --- a/repos/os/include/vfs/value_file_system.h +++ b/repos/os/include/vfs/value_file_system.h @@ -30,11 +30,11 @@ class Vfs::Value_file_system : public Vfs::Single_file_system { public: - typedef Genode::String<64> Name; + using Name = Genode::String<64>; private: - typedef Genode::String Buffer; + using Buffer = Genode::String; Name const _file_name; @@ -116,7 +116,7 @@ class Vfs::Value_file_system : public Vfs::Single_file_system }); } - typedef Genode::String<200> Config; + using Config = Genode::String<200>; Config _config(Name const &name) const { char buf[Config::capacity()] { }; diff --git a/repos/os/include/virtio/queue.h b/repos/os/include/virtio/queue.h index be60eaaee2..c0b975b84d 100644 --- a/repos/os/include/virtio/queue.h +++ b/repos/os/include/virtio/queue.h @@ -86,7 +86,7 @@ class Virtio::Queue protected: - typedef HEADER_TYPE Header_type; + using Header_type = HEADER_TYPE; struct Descriptor { diff --git a/repos/os/src/app/block_tester/main.cc b/repos/os/src/app/block_tester/main.cc index 4ed42cea7d..7599501b56 100644 --- a/repos/os/src/app/block_tester/main.cc +++ b/repos/os/src/app/block_tester/main.cc @@ -119,7 +119,7 @@ struct Test::Test_base : private Genode::Fifo::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::Element Allocator_avl _block_alloc { &_alloc }; struct Job; - typedef Block::Connection Block_connection; + using Block_connection = Block::Connection; Constructible _block { }; diff --git a/repos/os/src/app/block_tester/test_replay.h b/repos/os/src/app/block_tester/test_replay.h index e3299f1655..a5711a9a78 100644 --- a/repos/os/src/app/block_tester/test_replay.h +++ b/repos/os/src/app/block_tester/test_replay.h @@ -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; diff --git a/repos/os/src/app/cpu_burner/main.cc b/repos/os/src/app/cpu_burner/main.cc index 7232b65117..3b73093ed0 100644 --- a/repos/os/src/app/cpu_burner/main.cc +++ b/repos/os/src/app/cpu_burner/main.cc @@ -48,7 +48,7 @@ struct Cpu_burn : Thread struct Cpu_burner { - typedef List > Thread_list; + using Thread_list = List >; Env &_env; Heap _heap { _env.ram(), _env.rm() }; diff --git a/repos/os/src/app/dummy/main.cc b/repos/os/src/app/dummy/main.cc index 0784b75fda..e1664a343e 100644 --- a/repos/os/src/app/dummy/main.cc +++ b/repos/os/src/app/dummy/main.cc @@ -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 Connection; + using Connection = Registered; Registry _connections { }; @@ -303,7 +303,7 @@ struct Dummy::Main unsigned _config_cnt = 0; - typedef String<50> Version; + using Version = String<50>; Version _config_version { }; diff --git a/repos/os/src/app/global_keys_handler/main.cc b/repos/os/src/app/global_keys_handler/main.cc index d236eba413..653c3c2fe1 100644 --- a/repos/os/src/app/global_keys_handler/main.cc +++ b/repos/os/src/app/global_keys_handler/main.cc @@ -65,7 +65,7 @@ struct Global_keys_handler::Main { Registry::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::Element _element; @@ -139,7 +139,7 @@ struct Global_keys_handler::Main { Registry::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()); /* 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(); diff --git a/repos/os/src/app/nit_focus/main.cc b/repos/os/src/app/nit_focus/main.cc index 7169b07ace..db65a6ff1f 100644 --- a/repos/os/src/app/nit_focus/main.cc +++ b/repos/os/src/app/nit_focus/main.cc @@ -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 { diff --git a/repos/os/src/app/pointer/main.cc b/repos/os/src/app/pointer/main.cc index cefd59f21c..cda045825b 100644 --- a/repos/os/src/app/pointer/main.cc +++ b/repos/os/src/app/pointer/main.cc @@ -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(_view, View_handle()); _gui.execute(); diff --git a/repos/os/src/app/rom_logger/main.cc b/repos/os/src/app/rom_logger/main.cc index 8448e28d22..864dceebf9 100644 --- a/repos/os/src/app/rom_logger/main.cc +++ b/repos/os/src/app/rom_logger/main.cc @@ -29,7 +29,7 @@ struct Rom_logger::Main Genode::Constructible _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")); /* diff --git a/repos/os/src/app/rom_reporter/main.cc b/repos/os/src/app/rom_reporter/main.cc index 46bae3070e..95fe3fbabd 100644 --- a/repos/os/src/app/rom_reporter/main.cc +++ b/repos/os/src/app/rom_reporter/main.cc @@ -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() }; diff --git a/repos/os/src/app/rom_to_file/main.cc b/repos/os/src/app/rom_to_file/main.cc index 8a08cee63f..65be944ad4 100644 --- a/repos/os/src/app/rom_to_file/main.cc +++ b/repos/os/src/app/rom_to_file/main.cc @@ -38,7 +38,7 @@ struct Rom_to_file::Main Constructible _rom_ds { }; - typedef String<100> Rom_name; + using Rom_name = String<100>; /** * Name of currently requested ROM module diff --git a/repos/os/src/app/status_bar/main.cc b/repos/os/src/app/status_bar/main.cc index 26cfd6e694..c21d24f2f5 100644 --- a/repos/os/src/app/status_bar/main.cc +++ b/repos/os/src/app/status_bar/main.cc @@ -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(_view, View_handle()); /* import initial state */ diff --git a/repos/os/src/app/trace_logger/monitor.cc b/repos/os/src/app/trace_logger/monitor.cc index 87bfeea753..94e5226992 100644 --- a/repos/os/src/app/trace_logger/monitor.cc +++ b/repos/os/src/app/trace_logger/monitor.cc @@ -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()})), diff --git a/repos/os/src/app/trace_subject_reporter/main.cc b/repos/os/src/app/trace_subject_reporter/main.cc index 5546887200..25cf7de4f2 100644 --- a/repos/os/src/app/trace_subject_reporter/main.cc +++ b/repos/os/src/app/trace_subject_reporter/main.cc @@ -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)); diff --git a/repos/os/src/driver/ahci/ahci.h b/repos/os/src/driver/ahci/ahci.h index a586d7ba67..3b870f7192 100644 --- a/repos/os/src/driver/ahci/ahci.h +++ b/repos/os/src/driver/ahci/ahci.h @@ -943,20 +943,19 @@ struct Ahci::Port : private Port_base mmio.write((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) { diff --git a/repos/os/src/driver/ahci/ata_protocol.h b/repos/os/src/driver/ahci/ata_protocol.h index c99e5f3197..68cb27da60 100644 --- a/repos/os/src/driver/ahci/ata_protocol.h +++ b/repos/os/src/driver/ahci/ata_protocol.h @@ -145,8 +145,8 @@ class Ata::Protocol : public Ahci::Protocol, Noncopyable Util::Slots _slots { }; unsigned _slot_states = 0; - typedef String Serial_string; - typedef String Model_string; + using Serial_string = String; + using Model_string = String; Constructible _identity { }; bool _writeable { false }; diff --git a/repos/os/src/driver/audio/spec/linux/main.cc b/repos/os/src/driver/audio/spec/linux/main.cc index a1ebbe915f..03c9f08476 100644 --- a/repos/os/src/driver/audio/spec/linux/main.cc +++ b/repos/os/src/driver/audio/spec/linux/main.cc @@ -228,7 +228,7 @@ struct Audio_out::Root_policy namespace Audio_out { - typedef Root_component Root_component; + using Root_component = Root_component; } @@ -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 */ diff --git a/repos/os/src/driver/framebuffer/virtio/component.h b/repos/os/src/driver/framebuffer/virtio/component.h index 6f1210aa94..1ffd81c03b 100644 --- a/repos/os/src/driver/framebuffer/virtio/component.h +++ b/repos/os/src/driver/framebuffer/virtio/component.h @@ -178,7 +178,7 @@ class Virtio_fb::Driver static const bool has_data_payload = true; }; - typedef Virtio::Queue Control_queue; + using Control_queue = Virtio::Queue; class Fb_memory_resource : public Platform::Dma_buffer { diff --git a/repos/os/src/driver/input/virtio/component.h b/repos/os/src/driver/input/virtio/component.h index 9c90fd4f00..e98c876934 100644 --- a/repos/os/src/driver/input/virtio/component.h +++ b/repos/os/src/driver/input/virtio/component.h @@ -122,8 +122,8 @@ class Virtio_input::Driver enum { QUEUE_SIZE = 64, QUEUE_ELM_SIZE = sizeof(Event) }; - typedef Virtio::Queue Events_virtqueue; - typedef Virtio::Queue Status_virtqueue; + using Events_virtqueue = Virtio::Queue; + using Status_virtqueue = Virtio::Queue; Driver(Driver const &); Driver &operator = (Driver const &); diff --git a/repos/os/src/driver/nic/virtio/component.h b/repos/os/src/driver/nic/virtio/component.h index d0c96a8364..3c3ae6fbc8 100644 --- a/repos/os/src/driver/nic/virtio/component.h +++ b/repos/os/src/driver/nic/virtio/component.h @@ -143,8 +143,8 @@ class Virtio_nic::Device : Noncopyable static const bool has_data_payload = true; }; - typedef Virtio::Queue Rx_queue_type; - typedef Virtio::Queue Tx_queue_type; + using Rx_queue_type = Virtio::Queue; + using Tx_queue_type = Virtio::Queue; bool const _verbose; Virtio::Device &_device; diff --git a/repos/os/src/driver/ps2/led_state.h b/repos/os/src/driver/ps2/led_state.h index f149bc8114..af0e2df262 100644 --- a/repos/os/src/driver/ps2/led_state.h +++ b/repos/os/src/driver/ps2/led_state.h @@ -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()); diff --git a/repos/os/src/driver/uart/uart_component.h b/repos/os/src/driver/uart/uart_component.h index 69e437f88e..a3c1d3f8e3 100644 --- a/repos/os/src/driver/uart/uart_component.h +++ b/repos/os/src/driver/uart/uart_component.h @@ -35,7 +35,7 @@ namespace Uart { class Session_component; class Root; - typedef Root_component Root_component; + using Root_component = Root_component; }; diff --git a/repos/os/src/lib/genode_c_api/mac_address_reporter.cc b/repos/os/src/lib/genode_c_api/mac_address_reporter.cc index 1d500c61a7..e4913c5c13 100644 --- a/repos/os/src/lib/genode_c_api/mac_address_reporter.cc +++ b/repos/os/src/lib/genode_c_api/mac_address_reporter.cc @@ -19,7 +19,7 @@ using namespace Genode; -typedef String<32> Mac_name; +using Mac_name = String<32>; struct Mac_address : Registry::Element { diff --git a/repos/os/src/lib/genode_c_api/uplink.cc b/repos/os/src/lib/genode_c_api/uplink.cc index 761abb75aa..b798f956a7 100644 --- a/repos/os/src/lib/genode_c_api/uplink.cc +++ b/repos/os/src/lib/genode_c_api/uplink.cc @@ -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(); diff --git a/repos/os/src/lib/sandbox/alias.h b/repos/os/src/lib/sandbox/alias.h index 7f05a5052d..5446dc2e73 100644 --- a/repos/os/src/lib/sandbox/alias.h +++ b/repos/os/src/lib/sandbox/alias.h @@ -21,8 +21,8 @@ namespace Sandbox { struct Alias; } struct Sandbox::Alias : List::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; diff --git a/repos/os/src/lib/sandbox/child.cc b/repos/os/src/lib/sandbox/child.cc index 9150e267fc..666c902b0e 100644 --- a/repos/os/src/lib/sandbox/child.cc +++ b/repos/os/src/lib/sandbox/child.cc @@ -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 Label; + using Label = String; 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); diff --git a/repos/os/src/lib/sandbox/child.h b/repos/os/src/lib/sandbox/child.h index 263c9fb81b..9755453a6f 100644 --- a/repos/os/src/lib/sandbox/child.h +++ b/repos/os/src/lib/sandbox/child.h @@ -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_limit_accessor; - typedef Resource_limit_accessor Cap_limit_accessor; - typedef Resource_limit_accessor Cpu_limit_accessor; + using Ram_limit_accessor = Resource_limit_accessor; + using Cap_limit_accessor = Resource_limit_accessor; + using Cpu_limit_accessor = Resource_limit_accessor; 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 Service; + using Service = Genode::Local_service; Child &_child; diff --git a/repos/os/src/lib/sandbox/config_model.cc b/repos/os/src/lib/sandbox/config_model.cc index c38fc9bb4a..57ef127cce 100644 --- a/repos/os/src/lib/sandbox/config_model.cc +++ b/repos/os/src/lib/sandbox/config_model.cc @@ -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; diff --git a/repos/os/src/lib/sandbox/config_model.h b/repos/os/src/lib/sandbox/config_model.h index 4843347d0b..0d32a9018c 100644 --- a/repos/os/src/lib/sandbox/config_model.h +++ b/repos/os/src/lib/sandbox/config_model.h @@ -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 &, diff --git a/repos/os/src/lib/sandbox/name_registry.h b/repos/os/src/lib/sandbox/name_registry.h index f92f9e0ead..26eafb4b13 100644 --- a/repos/os/src/lib/sandbox/name_registry.h +++ b/repos/os/src/lib/sandbox/name_registry.h @@ -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 diff --git a/repos/os/src/lib/sandbox/route_model.h b/repos/os/src/lib/sandbox/route_model.h index f2a01ab7f1..e5f1f578c8 100644 --- a/repos/os/src/lib/sandbox/route_model.h +++ b/repos/os/src/lib/sandbox/route_model.h @@ -95,7 +95,7 @@ class Sandbox::Route_model : Noncopyable struct Selector { - typedef String Label; + using Label = String; enum class Type { diff --git a/repos/os/src/lib/sandbox/server.cc b/repos/os/src/lib/sandbox/server.cc index 3b43d487ee..c8e7a36136 100644 --- a/repos/os/src/lib/sandbox/server.cc +++ b/repos/os/src/lib/sandbox/server.cc @@ -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 Label; + using Label = String; 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(); Service::Name const name = request.attribute_value("service", Service::Name()); diff --git a/repos/os/src/lib/sandbox/service.h b/repos/os/src/lib/sandbox/service.h index f6e2899b54..b8ea878b3f 100644 --- a/repos/os/src/lib/sandbox/service.h +++ b/repos/os/src/lib/sandbox/service.h @@ -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 { diff --git a/repos/os/src/lib/sandbox/state_reporter.h b/repos/os/src/lib/sandbox/state_reporter.h index dc91498e2a..e911b632c7 100644 --- a/repos/os/src/lib/sandbox/state_reporter.h +++ b/repos/os/src/lib/sandbox/state_reporter.h @@ -29,7 +29,7 @@ class Sandbox::State_reporter : public Report_update_trigger { public: - typedef String<64> Version; + using Version = String<64>; struct Producer : Interface { diff --git a/repos/os/src/lib/sandbox/types.h b/repos/os/src/lib/sandbox/types.h index 56fd8ddd0d..f461b1288c 100644 --- a/repos/os/src/lib/sandbox/types.h +++ b/repos/os/src/lib/sandbox/types.h @@ -35,7 +35,7 @@ namespace Sandbox { void print(Output &out) const { Genode::print(out, percent, "%"); } }; - typedef List > Child_list; + using Child_list = List >; template 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_info; - typedef Resource_info Cap_info; + using Ram_info = Resource_info; + using Cap_info = Resource_info; template <> inline Ram_info Ram_info::from_pd(Pd_session const &pd) diff --git a/repos/os/src/lib/sandbox/utils.h b/repos/os/src/lib/sandbox/utils.h index cba9ca5d2c..9962f7e1a1 100644 --- a/repos/os/src/lib/sandbox/utils.h +++ b/repos/os/src/lib/sandbox/utils.h @@ -69,7 +69,7 @@ namespace Sandbox { if (!service_matches) return false; - typedef String Label; + using Label = String; 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()); diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index 580e24fb9c..5fd11841bc 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -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; diff --git a/repos/os/src/lib/vfs/capture/plugin.cc b/repos/os/src/lib/vfs/capture/plugin.cc index ce32769a3b..f4bb061438 100644 --- a/repos/os/src/lib/vfs/capture/plugin.cc +++ b/repos/os/src/lib/vfs/capture/plugin.cc @@ -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 Registered_handle; - typedef Genode::Registry Handle_registry; + using Registered_handle = Genode::Registered; + using Handle_registry = Genode::Registry; 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()] { }; diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index b0440fcb1b..022d926d2a 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -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_queue; + using Fs_vfs_handle_queue = Genode::Fifo; Remote_io::Peer _peer { _env.deferred_wakeups(), *this }; diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h index 7de2f76563..6cb6cfc311 100644 --- a/repos/os/src/lib/vfs/log_file_system.h +++ b/repos/os/src/lib/vfs/log_file_system.h @@ -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 _log_connection { }; diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index c0a724685b..a1719ce09a 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -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 Chunk_level_3; - typedef Chunk_index Chunk_level_2; - typedef Chunk_index Chunk_level_1; - typedef Chunk_index Chunk_level_0; + using Chunk_level_3 = Chunk ; + using Chunk_level_2 = Chunk_index; + using Chunk_level_1 = Chunk_index; + using Chunk_level_0 = Chunk_index; 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; diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index dc69dce776..d8587c3f78 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -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 Registered_watch_handle; - typedef Genode::Registry Watch_handle_registry; + using Registered_watch_handle = Genode::Registered; + using Watch_handle_registry = Genode::Registry; Watch_handle_registry _handle_registry { }; diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index 172e9ac3bf..cddbcaef11 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -106,8 +106,8 @@ class Vfs::Rtc_file_system : public Single_file_system bool write_ready() const override { return false; } }; - typedef Genode::Registered Registered_watch_handle; - typedef Genode::Registry Watch_handle_registry; + using Registered_watch_handle = Genode::Registered; + using Watch_handle_registry = Genode::Registry; Rtc::Connection _rtc; diff --git a/repos/os/src/lib/vfs/symlink_file_system.h b/repos/os/src/lib/vfs/symlink_file_system.h index 31e7a4a7e7..d13c8708be 100644 --- a/repos/os/src/lib/vfs/symlink_file_system.h +++ b/repos/os/src/lib/vfs/symlink_file_system.h @@ -24,7 +24,7 @@ class Vfs::Symlink_file_system : public Single_file_system { private: - typedef Genode::String Target; + using Target = Genode::String; Target const _target; diff --git a/repos/os/src/lib/vfs/tap/vfs_tap.cc b/repos/os/src/lib/vfs/tap/vfs_tap.cc index 1a177065cc..d19a5528b8 100644 --- a/repos/os/src/lib/vfs/tap/vfs_tap.cc +++ b/repos/os/src/lib/vfs/tap/vfs_tap.cc @@ -318,9 +318,9 @@ class Vfs::Tap_file_system::Compound_file_system : private Local_factory, { 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()] { }; diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h index 1f12c8a28e..ebc1d3cc54 100644 --- a/repos/os/src/lib/vfs/tar_file_system.h +++ b/repos/os/src/lib/vfs/tar_file_system.h @@ -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 Path_element_token; + using Path_element_token = Genode::Token; struct Node : List, List::Element diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index 7c7c23748d..8c62fb449c 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -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 Read_buffer; + using Read_buffer = Genode::Ring_buffer; Read_buffer _read_buffer { }; @@ -174,8 +174,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system } }; - typedef Genode::Registered Registered_handle; - typedef Genode::Registry Handle_registry; + using Registered_handle = Genode::Registered; + using Handle_registry = Genode::Registry; 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()] { }; diff --git a/repos/os/src/monitor/gdb_stub.h b/repos/os/src/monitor/gdb_stub.h index a4f71000ab..2df2e8dd8d 100644 --- a/repos/os/src/monitor/gdb_stub.h +++ b/repos/os/src/monitor/gdb_stub.h @@ -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", [&] { diff --git a/repos/os/src/server/black_hole/audio_in.h b/repos/os/src/server/black_hole/audio_in.h index 411528dd0a..e01fa93e77 100644 --- a/repos/os/src/server/black_hole/audio_in.h +++ b/repos/os/src/server/black_hole/audio_in.h @@ -109,7 +109,7 @@ class Audio_in::Session_component : Audio_in::Session_component_base, namespace Audio_in { - typedef Genode::Root_component Root_component; + using Root_component = Genode::Root_component; } diff --git a/repos/os/src/server/black_hole/audio_out.h b/repos/os/src/server/black_hole/audio_out.h index 3ccf19fe92..8c6186ffb1 100644 --- a/repos/os/src/server/black_hole/audio_out.h +++ b/repos/os/src/server/black_hole/audio_out.h @@ -112,7 +112,7 @@ class Audio_out::Session_component : Audio_out::Session_component_base, namespace Audio_out { - typedef Genode::Root_component Root_component; + using Root_component = Genode::Root_component; } diff --git a/repos/os/src/server/black_hole/capture.h b/repos/os/src/server/black_hole/capture.h index 474981a6e4..601c9f6333 100644 --- a/repos/os/src/server/black_hole/capture.h +++ b/repos/os/src/server/black_hole/capture.h @@ -93,7 +93,7 @@ class Capture::Session_component : public Session_object namespace Capture { - typedef Genode::Root_component Root_component; + using Root_component = Genode::Root_component; } diff --git a/repos/os/src/server/cached_fs_rom/main.cc b/repos/os/src/server/cached_fs_rom/main.cc index 2bcbbb174f..645ae46832 100644 --- a/repos/os/src/server/cached_fs_rom/main.cc +++ b/repos/os/src/server/cached_fs_rom/main.cc @@ -33,22 +33,22 @@ namespace Cached_fs_rom { using namespace Genode; - typedef Genode::Path Path; - typedef File_system::Session_client::Tx::Source Tx_source; + using Path = Genode::Path; + using Tx_source = File_system::Session_client::Tx::Source; struct Cached_rom; - typedef Genode::Id_space Cache_space; + using Cache_space = Genode::Id_space; struct Transfer; - typedef Genode::Id_space Transfer_space; + using Transfer_space = Genode::Id_space; class Session_component; - typedef Genode::Id_space Session_space; + using Session_space = Genode::Id_space; 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; } diff --git a/repos/os/src/server/cached_fs_rom/session_requests.h b/repos/os/src/server/cached_fs_rom/session_requests.h index 35d527281d..991e72e601 100644 --- a/repos/os/src/server/cached_fs_rom/session_requests.h +++ b/repos/os/src/server/cached_fs_rom/session_requests.h @@ -54,8 +54,8 @@ class Genode::Session_requests_rom : public Signal_handler 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 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(); } catch (...) { diff --git a/repos/os/src/server/chroot/component.cc b/repos/os/src/server/chroot/component.cc index df7a96f4cd..2bb97037c6 100644 --- a/repos/os/src/server/chroot/component.cc +++ b/repos/os/src/server/chroot/component.cc @@ -32,7 +32,7 @@ namespace Chroot { struct Chroot::Main { enum { PATH_MAX_LEN = 128 }; - typedef Genode::Path Path; + using Path = Genode::Path; /** * 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 Prefix; + using Prefix = String; 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(); Session *session = nullptr; diff --git a/repos/os/src/server/clipboard/main.cc b/repos/os/src/server/clipboard/main.cc index e21c858078..61b5517dee 100644 --- a/repos/os/src/server/clipboard/main.cc +++ b/repos/os/src/server/clipboard/main.cc @@ -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" }; diff --git a/repos/os/src/server/cpu_balancer/component.cc b/repos/os/src/server/cpu_balancer/component.cc index 8223963c4c..88a20d48ed 100644 --- a/repos/os/src/server/cpu_balancer/component.cc +++ b/repos/os/src/server/cpu_balancer/component.cc @@ -69,8 +69,8 @@ auto retry(T &env, FUNC func, HANDLER handler, return; } -typedef Genode::Registry > Sleeper_list; -typedef Genode::Tslab, 4096> Tslab_sleeper; +using Sleeper_list = Genode::Registry >; +using Tslab_sleeper = Genode::Tslab, 4096>; namespace Cpu { diff --git a/repos/os/src/server/cpu_balancer/config.cc b/repos/os/src/server/cpu_balancer/config.cc index c745d33ade..a3c9aeef2a 100644 --- a/repos/os/src/server/cpu_balancer/config.cc +++ b/repos/os/src/server/cpu_balancer/config.cc @@ -18,7 +18,7 @@ void Cpu::Config::apply(Xml_node const &start, Child_list &sessions) { - typedef String Label; + using Label = String; 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 Label; + using Label = String; start.for_each_sub_node("component", [&](Xml_node const &node) { if (!node.has_attribute("label")) diff --git a/repos/os/src/server/cpu_balancer/policy.h b/repos/os/src/server/cpu_balancer/policy.h index dc9da9c081..c4bab44a7f 100644 --- a/repos/os/src/server/cpu_balancer/policy.h +++ b/repos/os/src/server/cpu_balancer/policy.h @@ -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 { }; diff --git a/repos/os/src/server/cpu_balancer/session.h b/repos/os/src/server/cpu_balancer/session.h index c4c151c41c..7117971083 100644 --- a/repos/os/src/server/cpu_balancer/session.h +++ b/repos/os/src/server/cpu_balancer/session.h @@ -35,10 +35,10 @@ namespace Cpu { class Trace; class Policy; struct Thread_client; - typedef Id_space::Element Client_id; - typedef Registry > Child_list; - typedef Registry > Thread_list; - typedef Constrained_ram_allocator Ram_allocator; + using Client_id = Id_space::Element; + using Child_list = Registry >; + using Thread_list = Registry >; + using Ram_allocator = Constrained_ram_allocator; } struct Cpu::Thread_client : Interface diff --git a/repos/os/src/server/dynamic_rom/main.cc b/repos/os/src/server/dynamic_rom/main.cc index 8f532caf2f..4658fbccc7 100644 --- a/repos/os/src/server/dynamic_rom/main.cc +++ b/repos/os/src/server/dynamic_rom/main.cc @@ -74,7 +74,7 @@ class Dynamic_rom::Session_component : public Rpc_object 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 _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 Entrypoint &_ep; - typedef Session_component This; + using This = Session_component; Signal_handler _timer_handler = { _ep, *this, &This::_handle_timer }; public: diff --git a/repos/os/src/server/event_filter/chargen_source.h b/repos/os/src/server/event_filter/chargen_source.h index 484b6b8d30..e91d9736b2 100644 --- a/repos/os/src/server/event_filter/chargen_source.h +++ b/repos/os/src/server/event_filter/chargen_source.h @@ -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::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::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::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); diff --git a/repos/os/src/server/event_filter/event_session.h b/repos/os/src/server/event_filter/event_session.h index 599c1c26c0..07246674e9 100644 --- a/repos/os/src/server/event_filter/event_session.h +++ b/repos/os/src/server/event_filter/event_session.h @@ -27,7 +27,7 @@ namespace Event_filter { - typedef String Input_name; + using Input_name = String; class Event_session; class Event_root; diff --git a/repos/os/src/server/event_filter/include_accessor.h b/repos/os/src/server/event_filter/include_accessor.h index eb44f6567e..fc30e4480f 100644 --- a/repos/os/src/server/event_filter/include_accessor.h +++ b/repos/os/src/server/event_filter/include_accessor.h @@ -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 { }; diff --git a/repos/os/src/server/event_filter/key_code_by_name.h b/repos/os/src/server/event_filter/key_code_by_name.h index a2a975a427..d7c7e3f879 100644 --- a/repos/os/src/server/event_filter/key_code_by_name.h +++ b/repos/os/src/server/event_filter/key_code_by_name.h @@ -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 diff --git a/repos/os/src/server/event_filter/log_source.h b/repos/os/src/server/event_filter/log_source.h index d481608b40..3ad536f539 100644 --- a/repos/os/src/server/event_filter/log_source.h +++ b/repos/os/src/server/event_filter/log_source.h @@ -29,7 +29,7 @@ class Event_filter::Log_source : public Source, Source::Filter { private: - typedef String<32> Prefix; + using Prefix = String<32>; Prefix _prefix = ""; diff --git a/repos/os/src/server/event_filter/main.cc b/repos/os/src/server/event_filter/main.cc index b218b4237a..7b11959f23 100644 --- a/repos/os/src/server/event_filter/main.cc +++ b/repos/os/src/server/event_filter/main.cc @@ -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::Element _reg_elem; Name const _name; diff --git a/repos/os/src/server/fs_report/main.cc b/repos/os/src/server/fs_report/main.cc index 0dc2098c35..f753560377 100644 --- a/repos/os/src/server/fs_report/main.cc +++ b/repos/os/src/server/fs_report/main.cc @@ -32,12 +32,12 @@ namespace Fs_report { class Root; struct Main; - typedef Genode::Path Path; + using Path = Genode::Path; 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 template 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 { 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); diff --git a/repos/os/src/server/fs_rom/main.cc b/repos/os/src/server/fs_rom/main.cc index c89d92e5c0..609f73bc32 100644 --- a/repos/os/src/server/fs_rom/main.cc +++ b/repos/os/src/server/fs_rom/main.cc @@ -35,9 +35,9 @@ namespace Fs_rom { class Rom_session_component; class Rom_root; - typedef Id_space Sessions; + using Sessions = Id_space; - 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 Constructible _watch_elem { }; enum { PATH_MAX_LEN = 512 }; - typedef Genode::Path Path; + using Path = Genode::Path; /** * Name of requested file, interpreted at path into the file system diff --git a/repos/os/src/server/gui_fb/main.cc b/repos/os/src/server/gui_fb/main.cc index 016c15dae6..84418e0aab 100644 --- a/repos/os/src/server/gui_fb/main.cc +++ b/repos/os/src/server/gui_fb/main.cc @@ -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::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(view, Rect(position, fb_session.size())); gui.enqueue(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); diff --git a/repos/os/src/server/log_terminal/main.cc b/repos/os/src/server/log_terminal/main.cc index 36e431aba3..b6065f1add 100644 --- a/repos/os/src/server/log_terminal/main.cc +++ b/repos/os/src/server/log_terminal/main.cc @@ -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 */ ]; diff --git a/repos/os/src/server/lx_block/main.cc b/repos/os/src/server/lx_block/main.cc index 559a3d6a16..496b119a8a 100644 --- a/repos/os/src/server/lx_block/main.cc +++ b/repos/os/src/server/lx_block/main.cc @@ -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) { diff --git a/repos/os/src/server/lx_fs/main.cc b/repos/os/src/server/lx_fs/main.cc index b453f76c3e..10fb7db44b 100644 --- a/repos/os/src/server/lx_fs/main.cc +++ b/repos/os/src/server/lx_fs/main.cc @@ -576,7 +576,7 @@ class Lx_fs::Root : public Root_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()); /* diff --git a/repos/os/src/server/lx_fs/node.h b/repos/os/src/server/lx_fs/node.h index d4a91917ce..0718088790 100644 --- a/repos/os/src/server/lx_fs/node.h +++ b/repos/os/src/server/lx_fs/node.h @@ -42,7 +42,7 @@ class Lx_fs::Node : public File_system::Node_base public: using Path = Genode::Path; - typedef char Name[128]; + using Name = char[128]; private: diff --git a/repos/os/src/server/mixer/mixer.cc b/repos/os/src/server/mixer/mixer.cc index 28c7f0b4db..b1fd0b27ef 100644 --- a/repos/os/src/server/mixer/mixer.cc +++ b/repos/os/src/server/mixer/mixer.cc @@ -39,7 +39,7 @@ #include -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 Label; + using Label = Genode::String; } @@ -673,7 +673,7 @@ class Audio_out::Session_component : public Audio_out::Session_elem namespace Audio_out { - typedef Genode::Root_component Root_component; + using Root_component = Genode::Root_component; } diff --git a/repos/os/src/server/nic_bridge/component.h b/repos/os/src/server/nic_bridge/component.h index 42170f829b..0a0d1a17fe 100644 --- a/repos/os/src/server/nic_bridge/component.h +++ b/repos/os/src/server/nic_bridge/component.h @@ -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 diff --git a/repos/os/src/server/nic_bridge/packet_handler.h b/repos/os/src/server/nic_bridge/packet_handler.h index ee08b43fe0..56333bcee8 100644 --- a/repos/os/src/server/nic_bridge/packet_handler.h +++ b/repos/os/src/server/nic_bridge/packet_handler.h @@ -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; } /** diff --git a/repos/os/src/server/part_block/main.cc b/repos/os/src/server/part_block/main.cc index d8ae04ebe1..fd51d19059 100644 --- a/repos/os/src/server/part_block/main.cc +++ b/repos/os/src/server/part_block/main.cc @@ -38,8 +38,8 @@ namespace Block { template struct Job_queue; - typedef Constructible Job_object; - using Response = Request_stream::Response; + using Job_object = Constructible; + using Response = Request_stream::Response; }; diff --git a/repos/os/src/server/part_block/types.h b/repos/os/src/server/part_block/types.h index a88c815855..1b8c29fd1d 100644 --- a/repos/os/src/server/part_block/types.h +++ b/repos/os/src/server/part_block/types.h @@ -27,7 +27,7 @@ namespace Block { using namespace Genode; struct Job; - typedef Block::Connection Block_connection; + using Block_connection = Block::Connection; } #endif /* _PART_BLOCK__TYPES_H_ */ diff --git a/repos/os/src/server/rom_filter/input_rom_registry.h b/repos/os/src/server/rom_filter/input_rom_registry.h index 2207ea93ca..f261b24635 100644 --- a/repos/os/src/server/rom_filter/input_rom_registry.h +++ b/repos/os/src/server/rom_filter/input_rom_registry.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()); diff --git a/repos/os/src/server/rom_filter/main.cc b/repos/os/src/server/rom_filter/main.cc index 922136b04e..fbc4f74070 100644 --- a/repos/os/src/server/rom_filter/main.cc +++ b/repos/os/src/server/rom_filter/main.cc @@ -38,7 +38,7 @@ namespace Rom_filter { class Root; struct Main; - typedef Genode::List Session_list; + using Session_list = Genode::List; } @@ -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")) { diff --git a/repos/os/src/server/tar_rom/main.cc b/repos/os/src/server/tar_rom/main.cc index 00fd032c00..dccfeb5746 100644 --- a/repos/os/src/server/tar_rom/main.cc +++ b/repos/os/src/server/tar_rom/main.cc @@ -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 diff --git a/repos/os/src/server/vfs/assert.h b/repos/os/src/server/vfs/assert.h index 5a86785f5a..295cc16f31 100644 --- a/repos/os/src/server/vfs/assert.h +++ b/repos/os/src/server/vfs/assert.h @@ -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(); diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index d7f93feeb7..6081b4b15f 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -37,8 +37,8 @@ namespace Vfs_server { class Vfs_env; class Root; - typedef Genode::Fifo Session_queue; - typedef Genode::Entrypoint::Io_progress_handler Io_progress_handler; + using Session_queue = Genode::Fifo; + 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(id, [&] (Node &node) { - typedef typename Node_type::Type Typed_node; + using Typed_node = typename Node_type::Type; Typed_node *n = dynamic_cast(&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, _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, /* pull in policy changes */ _config_rom.update(); - typedef String Root_path; + using Root_path = String; Session_policy policy(label, _config_rom.xml()); diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index cb6f972d73..29bdad41ec 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -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_space; - typedef Genode::Fifo Node_queue; + using Node_space = Genode::Id_space; + using Node_queue = Genode::Fifo; /* Vfs::MAX_PATH is shorter than File_system::MAX_PATH */ enum { MAX_PATH_LEN = Vfs::MAX_PATH_LEN }; - typedef Genode::Path Path; + using Path = Genode::Path; - 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 struct Node_type; - template<> struct Node_type { typedef Io_node Type; }; - template<> struct Node_type { typedef Directory Type; }; - template<> struct Node_type { typedef File Type; }; - template<> struct Node_type { typedef Symlink Type; }; - template<> struct Node_type { typedef Watch_node Type; }; + template<> struct Node_type { using Type = Io_node; }; + template<> struct Node_type { using Type = Directory; }; + template<> struct Node_type { using Type = File; }; + template<> struct Node_type { using Type = Symlink; }; + template<> struct Node_type { using Type = Watch_node; }; /** * Type trait for determining the handle type for a given node type */ template struct Handle_type; - template<> struct Handle_type { typedef Node_handle Type; }; - template<> struct Handle_type { typedef Dir_handle Type; }; - template<> struct Handle_type { typedef File_handle Type; }; - template<> struct Handle_type { typedef Symlink_handle Type; }; - template<> struct Handle_type { typedef Watch_handle Type; }; + template<> struct Handle_type { using Type = Node_handle; }; + template<> struct Handle_type { using Type = Dir_handle; }; + template<> struct Handle_type { using Type = File_handle; }; + template<> struct Handle_type { using Type = Symlink_handle; }; + template<> struct Handle_type { 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 Write_buffer; + using Write_buffer = Genode::String; 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 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() { diff --git a/repos/os/src/test/bomb/main.cc b/repos/os/src/test/bomb/main.cc index f0e01e01d3..c791c4df60 100644 --- a/repos/os/src/test/bomb/main.cc +++ b/repos/os/src/test/bomb/main.cc @@ -115,7 +115,7 @@ class Bomb_child : public Child_policy }; -typedef Registry > Children; +using Children = Registry >; /** diff --git a/repos/os/src/test/clipboard/main.cc b/repos/os/src/test/clipboard/main.cc index 772575b34b..ef4893c72f 100644 --- a/repos/os/src/test/clipboard/main.cc +++ b/repos/os/src/test/clipboard/main.cc @@ -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(); diff --git a/repos/os/src/test/event_filter/main.cc b/repos/os/src/test/event_filter/main.cc index c6e46caeff..b41c5cc0f6 100644 --- a/repos/os/src/test/event_filter/main.cc +++ b/repos/os/src/test/event_filter/main.cc @@ -195,7 +195,7 @@ class Test::Input_to_filter Constructible _ps2 { }; Constructible _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(); diff --git a/repos/os/src/test/fs_report/main.cc b/repos/os/src/test/fs_report/main.cc index e577fb3c76..e7c2211d20 100644 --- a/repos/os/src/test/fs_report/main.cc +++ b/repos/os/src/test/fs_report/main.cc @@ -51,7 +51,7 @@ struct Test::Main Constructible _devices_reporter { }; Constructible _focus_reporter { }; - typedef String<80> Version; + using Version = String<80>; void _report(Reporter &reporter, Version const &version) { diff --git a/repos/os/src/test/init/main.cc b/repos/os/src/test/init/main.cc index ee89a7bbac..5ff8cfa91e 100644 --- a/repos/os/src/test/init/main.cc +++ b/repos/os/src/test/init/main.cc @@ -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 Message; + using Message = String; 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(); diff --git a/repos/os/src/test/init_loop/main.cc b/repos/os/src/test/init_loop/main.cc index 7539ead6ce..7dd8454933 100644 --- a/repos/os/src/test/init_loop/main.cc +++ b/repos/os/src/test/init_loop/main.cc @@ -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 void _apply_child(Xml_node state, Name const &name, FN const &fn) diff --git a/repos/os/src/test/nic_loopback/main.cc b/repos/os/src/test/nic_loopback/main.cc index e0ffc1535e..1bb5c68b89 100644 --- a/repos/os/src/test/nic_loopback/main.cc +++ b/repos/os/src/test/nic_loopback/main.cc @@ -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; diff --git a/repos/os/src/test/pointer/main.cc b/repos/os/src/test/pointer/main.cc index 8bcd98e2f3..223e42fd32 100644 --- a/repos/os/src/test/pointer/main.cc +++ b/repos/os/src/test/pointer/main.cc @@ -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; diff --git a/repos/os/src/test/resource_yield/main.cc b/repos/os/src/test/resource_yield/main.cc index dd2aa1df05..65cd46ec08 100644 --- a/repos/os/src/test/resource_yield/main.cc +++ b/repos/os/src/test/resource_yield/main.cc @@ -307,7 +307,7 @@ class Test::Parent ref_pd(), _env.rm(), _config_producer }; - typedef Genode::Local_service Config_service; + using Config_service = Genode::Local_service; Config_service::Single_session_factory _config_factory { _config_session }; Config_service _config_service { _config_factory }; diff --git a/repos/os/src/test/sandbox/main.cc b/repos/os/src/test/sandbox/main.cc index 54cf4906f0..3ac183bb82 100644 --- a/repos/os/src/test/sandbox/main.cc +++ b/repos/os/src/test/sandbox/main.cc @@ -55,7 +55,7 @@ struct Test::Main : Sandbox::Local_service_base::Wakeup Sandbox _sandbox { _env, _state_handler }; - typedef Sandbox::Local_service Log_service; + using Log_service = Sandbox::Local_service; Log_service _log_service { _sandbox, *this }; diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index 3b165207bd..bc5bb8aa1a 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -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 Path; +using Path = Genode::Path; 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) { diff --git a/repos/os/src/test/vmm_x86/component.cc b/repos/os/src/test/vmm_x86/component.cc index 2ba14d244a..c7cfe8c938 100644 --- a/repos/os/src/test/vmm_x86/component.cc +++ b/repos/os/src/test/vmm_x86/component.cc @@ -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); diff --git a/repos/pc/src/driver/framebuffer/intel/pc/main.cc b/repos/pc/src/driver/framebuffer/intel/pc/main.cc index 0c633fdecf..9f6bd8cf7e 100644 --- a/repos/pc/src/driver/framebuffer/intel/pc/main.cc +++ b/repos/pc/src/driver/framebuffer/intel/pc/main.cc @@ -43,7 +43,7 @@ namespace Framebuffer { struct Framebuffer::Driver { - typedef Constructible Attached_rom_system; + using Attached_rom_system = Constructible; Env &env; Timer::Connection timer { env }; @@ -324,7 +324,7 @@ void Framebuffer::Driver::lookup_config(char const * const name, /* iterate independently of force* ever to get brightness and hz */ config.xml().for_each_sub_node("connector", [&] (Xml_node &node) { - typedef String<32> Name; + using Name = String<32>; Name const con_policy = node.attribute_value("name", Name()); if (con_policy != name) return; diff --git a/repos/ports/src/app/verify/main.cc b/repos/ports/src/app/verify/main.cc index ecfd0a4804..2f2d5307c3 100644 --- a/repos/ports/src/app/verify/main.cc +++ b/repos/ports/src/app/verify/main.cc @@ -35,8 +35,8 @@ struct Verify::Main Constructible _reporter { }; - typedef String<256> Path; - typedef String<64> Message; + using Path = String<256>; + using Message = String<64>; static Message _message(Gnupg_verify_result result) { diff --git a/repos/ports/src/virtualbox6/include/fb.h b/repos/ports/src/virtualbox6/include/fb.h index 4dca3309ce..6fba107e33 100644 --- a/repos/ports/src/virtualbox6/include/fb.h +++ b/repos/ports/src/virtualbox6/include/fb.h @@ -25,7 +25,7 @@ #include #include -typedef Gui::Session::View_handle View_handle; +using View_handle = Gui::Session::View_handle; class Genodefb : VBOX_SCRIPTABLE_IMPL(IFramebuffer) @@ -75,7 +75,7 @@ class Genodefb : { _gui.buffer(_fb_mode, false); - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; Gui::Rect rect(Gui::Point(0, 0), _fb_mode.area); @@ -85,7 +85,7 @@ class Genodefb : Fb_Genode::Mode _initial_setup() { - typedef Gui::Session::Command Command; + using Command = Gui::Session::Command; _view = _gui.create_view(); @@ -237,8 +237,8 @@ class Genodefb : using namespace Genode; - typedef Pixel_rgb888 Pixel_src; - typedef Pixel_rgb888 Pixel_dst; + using Pixel_src = Pixel_rgb888; + using Pixel_dst = Pixel_rgb888; Texture texture((Pixel_src *)pAddress, nullptr, area_vm); Surface surface((Pixel_dst *)_fb_base, area_fb); @@ -274,8 +274,8 @@ class Genodefb : using namespace Genode; - typedef Pixel_rgb888 Pixel_src; - typedef Pixel_rgb888 Pixel_dst; + using Pixel_src = Pixel_rgb888; + using Pixel_dst = Pixel_rgb888; Texture texture((Pixel_src *)image, nullptr, area_vm); Surface surface((Pixel_dst *)_fb_base, area_fb); diff --git a/repos/ports/src/virtualbox6/input_adapter.h b/repos/ports/src/virtualbox6/input_adapter.h index 7ad0a6025e..93529215ea 100644 --- a/repos/ports/src/virtualbox6/input_adapter.h +++ b/repos/ports/src/virtualbox6/input_adapter.h @@ -32,7 +32,7 @@ struct Input_adapter bool _key_status[Input::KEY_MAX + 1]; - typedef Genode::Surface_base::Point Point; + using Point = Genode::Surface_base::Point; Point _abs_pos { 0, 0 }; diff --git a/repos/ports/src/virtualbox6/main.cc b/repos/ports/src/virtualbox6/main.cc index 1e64ce59b1..e880d06277 100644 --- a/repos/ports/src/virtualbox6/main.cc +++ b/repos/ports/src/virtualbox6/main.cc @@ -72,7 +72,7 @@ struct Event_listener } }; -typedef ListenerImpl Event_listener_impl; +using Event_listener_impl = ListenerImpl; VBOX_LISTENER_DECLARE(Event_listener_impl) @@ -85,7 +85,7 @@ struct Main : Event_handler struct Vbox_file_path { - typedef String<128> Path; + using Path = String<128>; Path const _path; diff --git a/repos/ports/src/virtualbox6/nem.cc b/repos/ports/src/virtualbox6/nem.cc index cadf6ac038..ce73da8001 100644 --- a/repos/ports/src/virtualbox6/nem.cc +++ b/repos/ports/src/virtualbox6/nem.cc @@ -51,7 +51,7 @@ struct Sup::Nem { Gmm &_gmm; - typedef Sup::Gmm::Protection Protection; + using Protection = Sup::Gmm::Protection; struct Range { diff --git a/repos/ports/src/virtualbox6/sup_vcpu_svm.h b/repos/ports/src/virtualbox6/sup_vcpu_svm.h index 59aa39aee5..53f38ee497 100644 --- a/repos/ports/src/virtualbox6/sup_vcpu_svm.h +++ b/repos/ports/src/virtualbox6/sup_vcpu_svm.h @@ -153,7 +153,7 @@ void Sup::Svm::transfer_state_to_vbox(Genode::Vcpu_state const &state, VMCPU &vm void Sup::Svm::transfer_state_to_vcpu(Genode::Vcpu_state &state, CPUMCTX const &ctx) { - typedef Genode::Vcpu_state::Segment Segment; + using Segment = Genode::Vcpu_state::Segment; state.efer.charge(state.efer.value() | MSR_K6_EFER_SVME); diff --git a/repos/ports/src/virtualbox6/sup_vcpu_vmx.h b/repos/ports/src/virtualbox6/sup_vcpu_vmx.h index 0993862462..21d2f73bb0 100644 --- a/repos/ports/src/virtualbox6/sup_vcpu_vmx.h +++ b/repos/ports/src/virtualbox6/sup_vcpu_vmx.h @@ -134,7 +134,7 @@ void Sup::Vmx::transfer_state_to_vbox(Vcpu_state const &state, VMCPU &vmcpu, CPU void Sup::Vmx::transfer_state_to_vcpu(Vcpu_state &state, CPUMCTX const &ctx) { - typedef Vcpu_state::Segment Segment; + using Segment = Vcpu_state::Segment; GENODE_WRITE_SELREG(cs); GENODE_WRITE_SELREG(ds);