mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 23:28:29 +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);
|
||||
},
|
||||
|
@ -248,8 +248,7 @@ class File_system::Packet_descriptor : public Genode::Packet_descriptor
|
||||
size_t length() const { return _op != Opcode::WRITE_TIMESTAMP ? _length : 0; }
|
||||
bool succeeded() const { return _success; }
|
||||
|
||||
template <typename FN>
|
||||
void with_timestamp(FN const &fn) const
|
||||
void with_timestamp(auto const &fn) const
|
||||
{
|
||||
if (_op == Opcode::WRITE_TIMESTAMP)
|
||||
fn(_modification_time);
|
||||
|
Reference in New Issue
Block a user