mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-01 08:48:20 +00:00
Remove hand-crafted Rpc_functions typedefs
This commit is contained in:
parent
ef9a7d2230
commit
15141f3ca7
@ -227,25 +227,9 @@ struct Genode::Cpu_session : Session
|
||||
GENODE_RPC(Rpc_quota, Quota, quota);
|
||||
GENODE_RPC(Rpc_native_cpu, Capability<Native_cpu>, native_cpu);
|
||||
|
||||
/*
|
||||
* 'GENODE_RPC_INTERFACE' declaration done manually
|
||||
*
|
||||
* The number of RPC functions of this interface exceeds the maximum
|
||||
* number of elements supported by 'Meta::Type_list'. Therefore, we
|
||||
* construct the type list by hand using nested type tuples instead
|
||||
* of employing the convenience macro 'GENODE_RPC_INTERFACE'.
|
||||
*/
|
||||
typedef Meta::Type_tuple<Rpc_create_thread,
|
||||
Meta::Type_tuple<Rpc_kill_thread,
|
||||
Meta::Type_tuple<Rpc_exception_sigh,
|
||||
Meta::Type_tuple<Rpc_affinity_space,
|
||||
Meta::Type_tuple<Rpc_trace_control,
|
||||
Meta::Type_tuple<Rpc_ref_account,
|
||||
Meta::Type_tuple<Rpc_transfer_quota,
|
||||
Meta::Type_tuple<Rpc_quota,
|
||||
Meta::Type_tuple<Rpc_native_cpu,
|
||||
Meta::Empty>
|
||||
> > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_create_thread, Rpc_kill_thread, Rpc_exception_sigh,
|
||||
Rpc_affinity_space, Rpc_trace_control, Rpc_ref_account,
|
||||
Rpc_transfer_quota, Rpc_quota, Rpc_native_cpu);
|
||||
};
|
||||
|
||||
|
||||
|
@ -154,29 +154,11 @@ struct Genode::Cpu_thread
|
||||
GENODE_RPC(Rpc_trace_buffer, Dataspace_capability, trace_buffer);
|
||||
GENODE_RPC(Rpc_trace_policy, Dataspace_capability, trace_policy);
|
||||
|
||||
/*
|
||||
* 'GENODE_RPC_INTERFACE' declaration done manually
|
||||
*
|
||||
* The number of RPC functions of this interface exceeds the maximum
|
||||
* number of elements supported by 'Meta::Type_list'. Therefore, we
|
||||
* construct the type list by hand using nested type tuples instead
|
||||
* of employing the convenience macro 'GENODE_RPC_INTERFACE'.
|
||||
*/
|
||||
typedef Meta::Type_tuple<Rpc_utcb,
|
||||
Meta::Type_tuple<Rpc_start,
|
||||
Meta::Type_tuple<Rpc_pause,
|
||||
Meta::Type_tuple<Rpc_resume,
|
||||
Meta::Type_tuple<Rpc_cancel_blocking,
|
||||
Meta::Type_tuple<Rpc_set_state,
|
||||
Meta::Type_tuple<Rpc_get_state,
|
||||
Meta::Type_tuple<Rpc_exception_sigh,
|
||||
Meta::Type_tuple<Rpc_single_step,
|
||||
Meta::Type_tuple<Rpc_affinity,
|
||||
Meta::Type_tuple<Rpc_trace_control_index,
|
||||
Meta::Type_tuple<Rpc_trace_buffer,
|
||||
Meta::Type_tuple<Rpc_trace_policy,
|
||||
Meta::Empty>
|
||||
> > > > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_utcb, Rpc_start, Rpc_pause, Rpc_resume,
|
||||
Rpc_cancel_blocking, Rpc_set_state, Rpc_get_state,
|
||||
Rpc_exception_sigh, Rpc_single_step, Rpc_affinity,
|
||||
Rpc_trace_control_index, Rpc_trace_buffer,
|
||||
Rpc_trace_policy);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__CPU_THREAD__CPU_THREAD_H_ */
|
||||
|
@ -250,19 +250,10 @@ class Genode::Parent
|
||||
GENODE_RPC(Rpc_yield_request, Resource_args, yield_request);
|
||||
GENODE_RPC(Rpc_yield_response, void, yield_response);
|
||||
|
||||
typedef Meta::Type_tuple<Rpc_exit,
|
||||
Meta::Type_tuple<Rpc_announce,
|
||||
Meta::Type_tuple<Rpc_session,
|
||||
Meta::Type_tuple<Rpc_upgrade,
|
||||
Meta::Type_tuple<Rpc_close,
|
||||
Meta::Type_tuple<Rpc_main_thread,
|
||||
Meta::Type_tuple<Rpc_resource_avail_sigh,
|
||||
Meta::Type_tuple<Rpc_resource_request,
|
||||
Meta::Type_tuple<Rpc_yield_sigh,
|
||||
Meta::Type_tuple<Rpc_yield_request,
|
||||
Meta::Type_tuple<Rpc_yield_response,
|
||||
Meta::Empty>
|
||||
> > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_exit, Rpc_announce, Rpc_session, Rpc_upgrade,
|
||||
Rpc_close, Rpc_main_thread, Rpc_resource_avail_sigh,
|
||||
Rpc_resource_request, Rpc_yield_sigh, Rpc_yield_request,
|
||||
Rpc_yield_response);
|
||||
};
|
||||
|
||||
|
||||
|
@ -209,24 +209,11 @@ struct Genode::Pd_session : Session
|
||||
|
||||
GENODE_RPC(Rpc_native_pd, Capability<Native_pd>, native_pd);
|
||||
|
||||
/*
|
||||
* Manual definition of 'Rpc_functions', see the comment in cpu_session.h.
|
||||
*/
|
||||
typedef Meta::Type_tuple<Rpc_assign_parent,
|
||||
Meta::Type_tuple<Rpc_assign_pci,
|
||||
Meta::Type_tuple<Rpc_alloc_signal_source,
|
||||
Meta::Type_tuple<Rpc_free_signal_source,
|
||||
Meta::Type_tuple<Rpc_alloc_context,
|
||||
Meta::Type_tuple<Rpc_free_context,
|
||||
Meta::Type_tuple<Rpc_submit,
|
||||
Meta::Type_tuple<Rpc_alloc_rpc_cap,
|
||||
Meta::Type_tuple<Rpc_free_rpc_cap,
|
||||
Meta::Type_tuple<Rpc_address_space,
|
||||
Meta::Type_tuple<Rpc_stack_area,
|
||||
Meta::Type_tuple<Rpc_linker_area,
|
||||
Meta::Type_tuple<Rpc_native_pd,
|
||||
Meta::Empty>
|
||||
> > > > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_assign_parent, Rpc_assign_pci,
|
||||
Rpc_alloc_signal_source, Rpc_free_signal_source,
|
||||
Rpc_alloc_context, Rpc_free_context, Rpc_submit,
|
||||
Rpc_alloc_rpc_cap, Rpc_free_rpc_cap, Rpc_address_space,
|
||||
Rpc_stack_area, Rpc_linker_area, Rpc_native_pd);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PD_SESSION__PD_SESSION_H_ */
|
||||
|
@ -141,20 +141,10 @@ struct Genode::Trace::Session : Genode::Session
|
||||
GENODE_RPC_THROW(Rpc_free, void, free,
|
||||
GENODE_TYPE_LIST(Nonexistent_subject), Subject_id);
|
||||
|
||||
typedef Meta::Type_tuple<Rpc_dataspace,
|
||||
Meta::Type_tuple<Rpc_alloc_policy,
|
||||
Meta::Type_tuple<Rpc_policy,
|
||||
Meta::Type_tuple<Rpc_unload_policy,
|
||||
Meta::Type_tuple<Rpc_trace,
|
||||
Meta::Type_tuple<Rpc_rule,
|
||||
Meta::Type_tuple<Rpc_pause,
|
||||
Meta::Type_tuple<Rpc_resume,
|
||||
Meta::Type_tuple<Rpc_subjects,
|
||||
Meta::Type_tuple<Rpc_subject_info,
|
||||
Meta::Type_tuple<Rpc_buffer,
|
||||
Meta::Type_tuple<Rpc_free,
|
||||
Meta::Empty>
|
||||
> > > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_dataspace, Rpc_alloc_policy, Rpc_policy,
|
||||
Rpc_unload_policy, Rpc_trace, Rpc_rule, Rpc_pause,
|
||||
Rpc_resume, Rpc_subjects, Rpc_subject_info, Rpc_buffer,
|
||||
Rpc_free);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__TRACE_SESSION__TRACE_SESSION_H_ */
|
||||
|
@ -388,26 +388,9 @@ struct File_system::Session : public Genode::Session
|
||||
Node_handle, Genode::Signal_context_capability);
|
||||
GENODE_RPC(Rpc_sync, void, sync, Node_handle);
|
||||
|
||||
/*
|
||||
* Manual type-list definition, needed because the RPC interface
|
||||
* exceeds the maximum number of type-list elements supported by
|
||||
* 'Genode::Meta::Type_list<>'.
|
||||
*/
|
||||
typedef Genode::Meta::Type_tuple<Rpc_tx_cap,
|
||||
Genode::Meta::Type_tuple<Rpc_file,
|
||||
Genode::Meta::Type_tuple<Rpc_symlink,
|
||||
Genode::Meta::Type_tuple<Rpc_dir,
|
||||
Genode::Meta::Type_tuple<Rpc_node,
|
||||
Genode::Meta::Type_tuple<Rpc_close,
|
||||
Genode::Meta::Type_tuple<Rpc_status,
|
||||
Genode::Meta::Type_tuple<Rpc_control,
|
||||
Genode::Meta::Type_tuple<Rpc_unlink,
|
||||
Genode::Meta::Type_tuple<Rpc_truncate,
|
||||
Genode::Meta::Type_tuple<Rpc_move,
|
||||
Genode::Meta::Type_tuple<Rpc_sigh,
|
||||
Genode::Meta::Type_tuple<Rpc_sync,
|
||||
Genode::Meta::Empty>
|
||||
> > > > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_tx_cap, Rpc_file, Rpc_symlink, Rpc_dir, Rpc_node,
|
||||
Rpc_close, Rpc_status, Rpc_control, Rpc_unlink,
|
||||
Rpc_truncate, Rpc_move, Rpc_sigh, Rpc_sync);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__FILE_SYSTEM_SESSION__FILE_SYSTEM_SESSION_H_ */
|
||||
|
@ -31,7 +31,6 @@ namespace Loader {
|
||||
|
||||
using Genode::Dataspace_capability;
|
||||
using Genode::Signal_context_capability;
|
||||
using Genode::Meta::Type_tuple;
|
||||
|
||||
struct Session;
|
||||
}
|
||||
@ -179,26 +178,10 @@ struct Loader::Session : Genode::Session
|
||||
GENODE_RPC_THROW(Rpc_view_size, Area, view_size,
|
||||
GENODE_TYPE_LIST(View_does_not_exist));
|
||||
|
||||
/*
|
||||
* 'GENODE_RPC_INTERFACE' declaration done manually
|
||||
*
|
||||
* The number of RPC function of this interface exceeds the maximum
|
||||
* number of elements supported by 'Meta::Type_list'. Therefore, we
|
||||
* construct the type list by hand using nested type tuples instead
|
||||
* of employing the convenience macro 'GENODE_RPC_INTERFACE'.
|
||||
*/
|
||||
typedef Type_tuple<Rpc_alloc_rom_module,
|
||||
Type_tuple<Rpc_commit_rom_module,
|
||||
Type_tuple<Rpc_ram_quota,
|
||||
Type_tuple<Rpc_constrain_geometry,
|
||||
Type_tuple<Rpc_parent_view,
|
||||
Type_tuple<Rpc_view_ready_sigh,
|
||||
Type_tuple<Rpc_fault_sigh,
|
||||
Type_tuple<Rpc_start,
|
||||
Type_tuple<Rpc_view_geometry,
|
||||
Type_tuple<Rpc_view_size,
|
||||
Genode::Meta::Empty>
|
||||
> > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_alloc_rom_module, Rpc_commit_rom_module,
|
||||
Rpc_ram_quota, Rpc_constrain_geometry,
|
||||
Rpc_parent_view, Rpc_view_ready_sigh, Rpc_fault_sigh,
|
||||
Rpc_start, Rpc_view_geometry, Rpc_view_size);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__LOADER_SESSION__LOADER_SESSION_H_ */
|
||||
|
@ -30,7 +30,6 @@ namespace Nitpicker {
|
||||
typedef Genode::Surface_base::Rect Rect;
|
||||
typedef Genode::Surface_base::Point Point;
|
||||
typedef Genode::Surface_base::Area Area;
|
||||
using Genode::Meta::Type_tuple;
|
||||
}
|
||||
|
||||
|
||||
@ -332,27 +331,11 @@ struct Nitpicker::Session : Genode::Session
|
||||
GENODE_RPC_THROW(Rpc_buffer, void, buffer, GENODE_TYPE_LIST(Out_of_metadata),
|
||||
Framebuffer::Mode, bool);
|
||||
|
||||
/*
|
||||
* The 'GENODE_RPC_INTERFACE' declaration is done manually because the
|
||||
* number of RPC functions exceeds the maxium arguments supported by the
|
||||
* 'Type_list' template.
|
||||
*/
|
||||
typedef Type_tuple<Rpc_framebuffer_session,
|
||||
Type_tuple<Rpc_input_session,
|
||||
Type_tuple<Rpc_create_view,
|
||||
Type_tuple<Rpc_destroy_view,
|
||||
Type_tuple<Rpc_view_handle,
|
||||
Type_tuple<Rpc_view_capability,
|
||||
Type_tuple<Rpc_release_view_handle,
|
||||
Type_tuple<Rpc_command_dataspace,
|
||||
Type_tuple<Rpc_execute,
|
||||
Type_tuple<Rpc_mode,
|
||||
Type_tuple<Rpc_mode_sigh,
|
||||
Type_tuple<Rpc_buffer,
|
||||
Type_tuple<Rpc_focus,
|
||||
Type_tuple<Rpc_session_control,
|
||||
Genode::Meta::Empty>
|
||||
> > > > > > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_framebuffer_session, Rpc_input_session,
|
||||
Rpc_create_view, Rpc_destroy_view, Rpc_view_handle,
|
||||
Rpc_view_capability, Rpc_release_view_handle,
|
||||
Rpc_command_dataspace, Rpc_execute, Rpc_mode,
|
||||
Rpc_mode_sigh, Rpc_buffer, Rpc_focus, Rpc_session_control);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__NITPICKER_SESSION__NITPICKER_SESSION_H_ */
|
||||
|
@ -246,16 +246,7 @@ struct Platform::Device : Platform::Abstract_device
|
||||
Genode::uint8_t, Genode::Cache_attribute,
|
||||
Genode::addr_t, Genode::size_t);
|
||||
|
||||
typedef Genode::Meta::Type_tuple<Rpc_bus_address,
|
||||
Genode::Meta::Type_tuple<Rpc_vendor_id,
|
||||
Genode::Meta::Type_tuple<Rpc_device_id,
|
||||
Genode::Meta::Type_tuple<Rpc_class_code,
|
||||
Genode::Meta::Type_tuple<Rpc_resource,
|
||||
Genode::Meta::Type_tuple<Rpc_config_read,
|
||||
Genode::Meta::Type_tuple<Rpc_config_write,
|
||||
Genode::Meta::Type_tuple<Rpc_irq,
|
||||
Genode::Meta::Type_tuple<Rpc_io_port,
|
||||
Genode::Meta::Type_tuple<Rpc_io_mem,
|
||||
Genode::Meta::Empty>
|
||||
> > > > > > > > > Rpc_functions;
|
||||
GENODE_RPC_INTERFACE(Rpc_bus_address, Rpc_vendor_id, Rpc_device_id,
|
||||
Rpc_class_code, Rpc_resource, Rpc_config_read,
|
||||
Rpc_config_write, Rpc_irq, Rpc_io_port, Rpc_io_mem);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user