mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-11 13:03:11 +00:00
base-hw: remove throw from ipc_call code path
This eliminates the dependency of the IPC-call operation from the cxx heap. Fixes #3612
This commit is contained in:
parent
0bb2e61e9e
commit
3e4af3a567
@ -96,22 +96,23 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst,
|
|||||||
{
|
{
|
||||||
Native_utcb &utcb = *Thread::myself()->utcb();
|
Native_utcb &utcb = *Thread::myself()->utcb();
|
||||||
|
|
||||||
retry<Genode::Allocator::Out_of_memory>(
|
/*
|
||||||
[&] () {
|
* Issue IPC call, upgrade the PD's capability slab on demand.
|
||||||
|
*/
|
||||||
|
for (bool done = false; !done; ) {
|
||||||
|
|
||||||
copy_msg_to_utcb(snd_msg, *Thread::myself()->utcb());
|
copy_msg_to_utcb(snd_msg, *Thread::myself()->utcb());
|
||||||
|
|
||||||
switch (Kernel::send_request_msg(Capability_space::capid(dst),
|
switch (Kernel::send_request_msg(Capability_space::capid(dst),
|
||||||
(unsigned)rcv_caps)) {
|
(unsigned)rcv_caps)) {
|
||||||
|
|
||||||
case -1: throw Blocking_canceled();
|
case -1: throw Blocking_canceled();
|
||||||
case -2: throw Allocator::Out_of_memory();
|
case -2: upgrade_capability_slab(); break;
|
||||||
default:
|
default: done = true; break;
|
||||||
copy_utcb_to_msg(utcb, rcv_msg);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
copy_utcb_to_msg(utcb, rcv_msg);
|
||||||
[&] () { upgrade_capability_slab(); });
|
|
||||||
|
|
||||||
return Rpc_exception_code((int)utcb.exception_code());
|
return Rpc_exception_code((int)utcb.exception_code());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user