input/root.h: support re-opening of sessions

This patch fixes an aliasing problem of the 'close' method signature
that prevented the Input::Root_component::close method to be called.
This way, the event-queue state was not reset at session-close time,
which prevented a subsequent session-creation request to succeed. With
the patch, input servers like ps2_drv, usb_drv that rely on the
Input::Root_component support the dynamic re-opening of sessions. This
happens in particular when using a dynamically configured input filter.
This commit is contained in:
Norman Feske 2017-09-22 11:33:24 +02:00 committed by Christian Helmuth
parent 86656517e3
commit 6d361b337b
2 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class Input::Root_component : public Genode::Static_root<Input::Session>
return Static_root<Input::Session>::session(args, affinity);
}
void close(Genode::Capability<Session>)
void close(Genode::Capability<Genode::Session>) override
{
_session.event_queue().enabled(false);
}

View File

@ -51,14 +51,14 @@ class Genode::Static_root : public Genode::Rpc_object<Genode::Typed_root<SESSION
** Root interface **
********************/
Capability<Session> session(Root::Session_args const &args, Affinity const &)
Capability<Session> session(Root::Session_args const &args, Affinity const &) override
{
return _session;
}
void upgrade(Capability<Session>, Root::Upgrade_args const &) { }
void upgrade(Capability<Session>, Root::Upgrade_args const &) override { }
void close(Capability<Session>) { }
void close(Capability<Session>) override { }
};
#endif /* _INCLUDE__OS__STATIC_ROOT_H_ */