genode/os/run/timer.run
Norman Feske 3049c1004c Turn 'Timer::Session' into asynchronous interface
The 'Timer::Session::msleep' function is one of the last occurrences of
long-blocking RPC calls. Synchronous blocking RPC interfaces turned out
to be constant source of trouble and code complexity. I.e., a timer
client that also wants to respond to non-timer events was forced to be a
multi-threaded process. This patch replaces the blocking 'msleep' call
by a mechanism for programming timeouts and receiving wakeup signals in
an asynchronous fashion. Thereby signals originating from the timer can
be handled along with signals from other signal sources by a single
thread.

The changed interface has been tested on Linux, L4/Fiasco, OKL4, NOVA,
L4ka::Pistachio, Codezero, Fiasco.OC, and hw_pbxa9. Furthermore, this
patch adds the timer test to autopilot.

Fixes #1
2013-02-14 10:36:06 +01:00

52 lines
1.1 KiB
Plaintext

#
# \brief Basic test for genode timer-session
# \author Martin Stein
# \date 2012-05-29
#
# Build program images
build { core init drivers/timer test/timer }
# Create directory where boot files are written to
create_boot_directory
# Define XML configuration for init
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
</parent-provides>
<default-route>
<any-service><parent/><any-child/></any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="10M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="client">
<binary name="test-timer"/>
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
# Build boot files from source binaries
build_boot_image { core init timer test-timer }
# Configure Qemu
append qemu_args " -m 64 -nographic"
# Execute test in Qemu
run_genode_until "--- timer test finished ---" 60