mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 22:28:18 +00:00
committed by
Christian Helmuth
parent
5e862b2cd3
commit
cfd013a01a
@ -39,14 +39,13 @@ struct File_system::Connection : Genode::Connection<Session>, Session_client
|
||||
*
|
||||
* \noapi
|
||||
*/
|
||||
template <typename FUNC>
|
||||
auto _retry(FUNC func) -> decltype(func())
|
||||
auto _retry(auto const &fn) -> decltype(fn())
|
||||
{
|
||||
enum { UPGRADE_ATTEMPTS = ~0U };
|
||||
return Genode::retry<Out_of_ram>(
|
||||
[&] () {
|
||||
return Genode::retry<Out_of_caps>(
|
||||
[&] () { return func(); },
|
||||
[&] () { return fn(); },
|
||||
[&] () { File_system::Connection::upgrade_caps(2); },
|
||||
UPGRADE_ATTEMPTS);
|
||||
},
|
||||
|
Reference in New Issue
Block a user