mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Merge branch 'master' of github.com:mmueller41/genode
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user