[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: L4 interrupt association
From: |
Espen Skoglund |
Subject: |
Re: L4 interrupt association |
Date: |
Wed, 14 May 2003 20:07:09 +0200 |
[Peter De Schrijver]
>> I do not think it makes sense to use the RTC timer in the first
>> place, since L4/X2 provides you an accurate time base using the
>> SystemClock syscall which also respects processor frequency changes
>> etc and is extremely cheap. This also makes the code portable over
>> different hardware platforms.
> Oh, does the SystemClock give me the wall clock time then ? I was
> under the impression SystemClock gives me the time passed since
> system boot.
SystemClock gives you the number of microseconds passed since some
base time (the base time is not defined). Calling something a wall
clock time doesn't make sense unless you also specify what time 0 of
the wall clock is.
If you want to specify a timeout 10 seconds into the future, you can
use something like:
L4_Time_t timeout = L4_TimePoint (L4_SystemClock () + 10*1000*1000);
The timeout value can then be used for various IPC operations. In
particular, you could say:
L4_Sleep (timeout);
This gives you an efficient and portable way to wait for a specific
time to be reached. You could also let N threads use the same
timeout, causing all threads to be woken up at exactly the same time.
eSk