From 25b41e9cffda354838b80f667ea7f10efccbb40b Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 14 Jan 2014 16:15:28 +0100 Subject: [PATCH] hello: fix quota value and integration of timer Fixes #1028. --- hello_tutorial/doc/hello_tutorial.txt | 20 +++++++++++++------- hello_tutorial/src/hello/client/main.cc | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/hello_tutorial/doc/hello_tutorial.txt b/hello_tutorial/doc/hello_tutorial.txt index ad8acf74c..d52a48248 100644 --- a/hello_tutorial/doc/hello_tutorial.txt +++ b/hello_tutorial/doc/hello_tutorial.txt @@ -402,14 +402,20 @@ Add a 'target.mk' file with the following content to 'src/hello/client/': ! SRC_CC = main.cc ! LIBS = base -Add the following entries to your 'config' file: +Extend your 'config' file as follows. -! -! -! -! -! -! +# Add the 'SIGNAL' service to the '' section: + + ! + +# Add start entries for 'Timer' service and hello client: + + ! + ! + ! + ! + ! + ! Build 'drivers/timer', and 'hello/client', go to 'build/bin', and run './core' again. You have now successfully implemented your first Genode client-server diff --git a/hello_tutorial/src/hello/client/main.cc b/hello_tutorial/src/hello/client/main.cc index daa4dc91d..6808b5e9f 100644 --- a/hello_tutorial/src/hello/client/main.cc +++ b/hello_tutorial/src/hello/client/main.cc @@ -16,17 +16,22 @@ #include #include +#include + using namespace Genode; int main(void) { Hello::Connection h; + Timer::Connection timer; + while (1) { h.say_hello(); int foo = h.add(2, 5); PDBG("Added 2 + 5 = %d", foo); + timer.msleep(1000); } return 0;