diff --git a/repos/os/src/monitor/main.cc b/repos/os/src/monitor/main.cc index d21241d82c..c73ccfb78f 100644 --- a/repos/os/src/monitor/main.cc +++ b/repos/os/src/monitor/main.cc @@ -17,7 +17,7 @@ #include #include #include -#include +#include /* local includes */ #include @@ -115,7 +115,7 @@ struct Monitor::Main : Sandbox::State_handler, { Env &_env; - Terminal::Connection _terminal { _env }; + Terminal_connection _terminal { _env }; Signal_handler _terminal_read_avail_handler { _env.ep(), *this, &Gdb_stub::_handle_terminal_read_avail }; @@ -130,7 +130,7 @@ struct Monitor::Main : Sandbox::State_handler, { struct Write_fn { - Terminal::Connection &_terminal; + Terminal_connection &_terminal; void operator () (char const *str) { size_t const num_bytes = strlen(str); diff --git a/repos/os/src/monitor/terminal_connection.h b/repos/os/src/monitor/terminal_connection.h new file mode 100644 index 0000000000..6638d45f65 --- /dev/null +++ b/repos/os/src/monitor/terminal_connection.h @@ -0,0 +1,32 @@ +/* + * \brief Connection to Terminal service without waiting + * \author Norman Feske + * \date 2024-07-05 + */ + +/* + * Copyright (C) 2024 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _TERMINAL_CONNECTION_H_ +#define _TERMINAL_CONNECTION_H_ + +#include +#include + +namespace Monitor { struct Terminal_connection; } + + +struct Monitor::Terminal_connection : Genode::Connection, Terminal::Session_client +{ + Terminal_connection(Genode::Env &env, Label const &label = Label()) + : + Genode::Connection(env, label, Ram_quota { 10*1024 }, Args()), + Terminal::Session_client(env.rm(), cap()) + { } +}; + +#endif /* _TERMINAL_CONNECTION_H_ */