mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
@@ -75,13 +75,13 @@ class Genode::Connection_base : Noncopyable, Interface
|
||||
{
|
||||
enum { UPGRADE_ATTEMPTS = ~0U };
|
||||
return Genode::retry<Out_of_ram>(
|
||||
[&] () {
|
||||
[&] {
|
||||
return Genode::retry<Out_of_caps>(
|
||||
[&] () { return fn(); },
|
||||
[&] () { upgrade_caps(caps.value); },
|
||||
[&] { return fn(); },
|
||||
[&] { upgrade_caps(caps.value); },
|
||||
UPGRADE_ATTEMPTS);
|
||||
},
|
||||
[&] () { upgrade_ram(ram.value); },
|
||||
[&] { upgrade_ram(ram.value); },
|
||||
UPGRADE_ATTEMPTS);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -80,8 +80,8 @@ class Genode::Page_table_allocator
|
||||
table.~TABLE();
|
||||
_free((unsigned)(_offset(table) / sizeof(TABLE)));
|
||||
},
|
||||
[&] () {
|
||||
Genode::error("Trying to destruct foreign table at ", Genode::Hex(phys_addr));
|
||||
[&] {
|
||||
Genode::error("Trying to destruct foreign table at ", Genode::Hex(phys_addr));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ class Genode::Page_directory
|
||||
table.insert_translation(vo - (vo & PAGE_MASK), pa, size,
|
||||
flags, alloc, flush, supported_sizes);
|
||||
},
|
||||
[&] () {
|
||||
[&] {
|
||||
error("Unable to get mapped table address for ",
|
||||
Genode::Hex(Td::Pa::masked(desc)));
|
||||
});
|
||||
@@ -334,7 +334,7 @@ class Genode::Page_directory
|
||||
desc = 0;
|
||||
}
|
||||
},
|
||||
[&] () {
|
||||
[&] {
|
||||
error("Unable to get mapped table address for ",
|
||||
Genode::Hex(table_phys));
|
||||
});
|
||||
@@ -490,7 +490,7 @@ class Genode::Pml4_table
|
||||
table.insert_translation(table_vo, pa, size, flags, alloc,
|
||||
flush, supported_sizes);
|
||||
},
|
||||
[&] () {
|
||||
[&] {
|
||||
error("Unable to get mapped table address for ",
|
||||
Genode::Hex(table_phys));
|
||||
});
|
||||
@@ -525,7 +525,7 @@ class Genode::Pml4_table
|
||||
clflush(&desc);
|
||||
}
|
||||
},
|
||||
[&] () {
|
||||
[&] {
|
||||
error("Unable to get mapped table address for ",
|
||||
Genode::Hex(table_phys));
|
||||
});
|
||||
|
||||
@@ -307,12 +307,12 @@ class Genode::Xml_generator
|
||||
}
|
||||
}
|
||||
|
||||
void node(char const *name, auto const &fn = [] () { } )
|
||||
void node(char const *name, auto const &fn = [] { } )
|
||||
{
|
||||
Node(*this, name, fn);
|
||||
}
|
||||
|
||||
void node(char const *name) { Node(*this, name, [] () { }); }
|
||||
void node(char const *name) { Node(*this, name, [] { }); }
|
||||
|
||||
void attribute(char const *name, char const *str)
|
||||
{
|
||||
|
||||
@@ -108,12 +108,12 @@ struct Genode::Vm_connection : Connection<Vm_session>, Rpc_client<Vm_session>
|
||||
auto with_upgrade(auto const &fn) -> decltype(fn())
|
||||
{
|
||||
return Genode::retry<Genode::Out_of_ram>(
|
||||
[&] () {
|
||||
[&] {
|
||||
return Genode::retry<Genode::Out_of_caps>(
|
||||
[&] () { return fn(); },
|
||||
[&] () { this->upgrade_caps(2); });
|
||||
[&] { return fn(); },
|
||||
[&] { this->upgrade_caps(2); });
|
||||
},
|
||||
[&] () { this->upgrade_ram(4096); }
|
||||
[&] { this->upgrade_ram(4096); }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ struct Genode::Vm_connection : Connection<Vm_session>, Rpc_client<Vm_session>
|
||||
|
||||
void attach(Dataspace_capability ds, addr_t vm_addr, Attach_attr attr) override
|
||||
{
|
||||
with_upgrade([&] () {
|
||||
with_upgrade([&] {
|
||||
call<Rpc_attach>(ds, vm_addr, attr); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user