Merge branch 'master' of github.com:mmueller41/genode

This commit is contained in:
Michael Mueller
2022-07-11 12:31:15 +02:00
2 changed files with 15 additions and 3 deletions

View File

@@ -22,6 +22,13 @@ install_config {
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="60"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
<route>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="hello_server">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Hello"/> </provides>

View File

@@ -16,10 +16,12 @@
#include <base/log.h>
#include <base/attached_rom_dataspace.h>
#include <hello_session/connection.h>
#include <timer_session/connection.h>
struct HelloClient {
Genode::Env &_env;
Hello::Connection &_hello;
Timer::Connection _timer{_env};
unsigned short _a;
unsigned short _b;
@@ -49,9 +51,12 @@ struct HelloClient {
{
_hello.say_hello();
int const sum = _hello.add(_a, _b);
Genode::log("added ", _a, " + ", _b, " = ", sum);
while (true) {
int const sum = _hello.add(_a, _b);
Genode::log("added ", _a, " + ", _b, " = ", sum);
_timer.msleep(_a*1000);
_b += 2;
}
Genode::log("hello test completed.");
}