Remove exceptions from Pd_session interface

This patch replaces exceptions of the PD session RPC interface with
result types.
The change of the quota-transfer RPC functions required the adaptation
of base/quota_transfer.h and base/child.h.
The 'alloc_signal_source' method has been renamed to 'signal_source'
to avoid an exceedingly long name of the corresponding result type.
The Pd_session::map function takes a 'Virt_range' instead of basic-type
arguments.
The 'Signal_source_capability' alias for 'Capability<Signal_source>' has
been removed.

Issue #5245
This commit is contained in:
Norman Feske
2024-06-13 16:35:00 +02:00
parent 08066269ba
commit 0d7d60a1f4
24 changed files with 302 additions and 256 deletions

View File

@ -118,9 +118,10 @@ class Sandbox::Routed_service : public Async_service, public Abandonable
/**
* Ram_transfer::Account interface
*/
void transfer(Pd_session_capability to, Ram_quota amount) override
Ram_transfer_result transfer(Pd_session_capability to, Ram_quota amount) override
{
if (to.valid()) _pd_accessor.pd().transfer_quota(to, amount);
return to.valid() ? _pd_accessor.pd().transfer_quota(to, amount)
: Ram_transfer_result::OK;
}
/**
@ -134,9 +135,10 @@ class Sandbox::Routed_service : public Async_service, public Abandonable
/**
* Cap_transfer::Account interface
*/
void transfer(Pd_session_capability to, Cap_quota amount) override
Cap_transfer_result transfer(Pd_session_capability to, Cap_quota amount) override
{
if (to.valid()) _pd_accessor.pd().transfer_quota(to, amount);
return to.valid() ? _pd_accessor.pd().transfer_quota(to, amount)
: Cap_transfer_result::OK;
}
/**