mml/thread_test: Fixed compiler errors.

This commit is contained in:
Michael Müller
2022-07-11 14:55:34 +02:00
parent 383ad4ca45
commit 73e34a542e

View File

@@ -11,11 +11,13 @@ struct ThreadTest::Main
{
Genode::Env &_env;
Main(Genode::Env &env) : _env(env) {}
void execute()
{
while(true) {
std::cout << "Hello world" << std::endl;
std::this_thread::sleep_for(std::chrone::seconds(1));
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
};
@@ -23,6 +25,6 @@ struct ThreadTest::Main
void Component::construct(Genode::Env &env)
{
static ThreadTest::Main main(env);
std::thread([main]
{ main->execute(); });
std::thread([&]
{ main.execute(); });
}