mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 06:38:28 +00:00
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:
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user