mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 14:48:20 +00:00
base: mark Parent::Close_result with [[nodiscard]]
This commit is contained in:
@ -200,7 +200,7 @@ class Genode::Parent
|
|||||||
virtual Upgrade_result upgrade(Client::Id to_session,
|
virtual Upgrade_result upgrade(Client::Id to_session,
|
||||||
Upgrade_args const &args) = 0;
|
Upgrade_args const &args) = 0;
|
||||||
|
|
||||||
enum Close_result { CLOSE_DONE, CLOSE_PENDING };
|
enum [[nodiscard]] Close_result { CLOSE_DONE, CLOSE_PENDING };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close session
|
* Close session
|
||||||
|
@ -867,7 +867,7 @@ void Child::close_all_sessions()
|
|||||||
* running.
|
* running.
|
||||||
*/
|
*/
|
||||||
while (unsigned long id_value = any_cpu_session_id(_id_space).value)
|
while (unsigned long id_value = any_cpu_session_id(_id_space).value)
|
||||||
close(Parent::Client::Id{id_value});
|
(void)close(Parent::Client::Id{id_value});
|
||||||
|
|
||||||
_initial_thread.destruct();
|
_initial_thread.destruct();
|
||||||
|
|
||||||
@ -921,7 +921,7 @@ void Child::close_all_sessions()
|
|||||||
auto close_fn = [&] (Session_state &session) {
|
auto close_fn = [&] (Session_state &session) {
|
||||||
session.closed_callback = nullptr;
|
session.closed_callback = nullptr;
|
||||||
session.ready_callback = nullptr;
|
session.ready_callback = nullptr;
|
||||||
_close(session);
|
(void)_close(session);
|
||||||
};
|
};
|
||||||
|
|
||||||
while (_id_space.apply_any<Session_state>(close_fn));
|
while (_id_space.apply_any<Session_state>(close_fn));
|
||||||
|
Reference in New Issue
Block a user