demo: make cancel_blocking working

- remove special handling from base-nova
- add to rpc_server where it actually should be applied to
- required to work for sel4 cancel_blocking

Issue #2044
This commit is contained in:
Alexander Boettcher 2016-07-29 13:36:43 +02:00 committed by Christian Helmuth
parent 7b35927147
commit 5a0bc07d30
4 changed files with 14 additions and 8 deletions

View File

@ -87,13 +87,6 @@ void Rpc_entrypoint::_dissolve(Rpc_object_base *obj)
if (utcb == reinterpret_cast<Utcb *>(this->utcb()))
return;
/*
* Required outside of core. E.g. launchpad needs it to forcefully kill
* a client which blocks on a session opening request where the service
* is not up yet.
*/
cancel_blocking();
/* activate entrypoint now - otherwise cleanup call will block forever */
_delay_start.unlock();

View File

@ -442,6 +442,13 @@ class Genode::Rpc_entrypoint : Thread, public Object_pool<Rpc_object_base>
* This method is solely needed on Linux.
*/
bool is_myself() const;
/**
* Required outside of core. E.g. launchpad needs it to forcefully kill
* a client which blocks on a session opening request where the service
* is not up yet.
*/
void cancel_blocking() { Thread::cancel_blocking(); }
};
#endif /* _INCLUDE__BASE__RPC_SERVER_H_ */

View File

@ -206,6 +206,12 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
_entrypoint.activate();
}
/**
* Required to forcefully kill client which blocks on a session
* opening quest where the service is not up yet.
*/
void cancel_blocking() { _entrypoint.cancel_blocking(); }
Genode::Rom_session_capability rom_session_cap() { return _rom; }
Genode::Ram_session_capability ram_session_cap() { return _ram; }
Genode::Cpu_session_capability cpu_session_cap() { return _cpu; }

View File

@ -394,7 +394,7 @@ class Child_destructor_thread : Thread_deprecated<2*4096>
* bit to proceed and reset the watchdog counter to give
* the next blocking operation a chance to execute.
*/
cancel_blocking();
child->cancel_blocking();
_watchdog_cnt = 0;
}
}