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

@ -83,7 +83,7 @@ void Device_pd::add_range(Io_mmu::Range const & range,
_pd.attach_dma(cap, range.start).with_result(
[&] (Pd_session::Attach_dma_ok) {
/* trigger eager mapping of memory */
_pd.map(range.start, range.size);
_pd.map(Pd_session::Virt_range { range.start, range.size });
retry = false;
},
[&] (Pd_session::Attach_dma_error e) {
@ -123,7 +123,7 @@ void Device_pd::enable_pci_device(Io_mem_dataspace_capability const io_mem_cap,
throw Region_map::Region_conflict();
/* trigger eager mapping of memory */
_pd.map(addr, 0x1000);
_pd.map(Pd_session::Virt_range { addr, 0x1000 });
/* try to assign pci device to this protection domain */
if (!_pd.assign_pci(addr, Pci::Bdf::rid(bdf)))