]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/timer.cpp
Some minor fixes.
[l4.git] / kernel / fiasco / src / kern / timer.cpp
1 INTERFACE:
2
3 #include "initcalls.h"
4 #include "l4_types.h"
5
6 class Timer
7 {
8 public:
9   /**
10    * Static constructor for the interval timer.
11    *
12    * The implementation is platform specific. Two x86 implementations
13    * are timer-pit and timer-rtc.
14    */
15   static void init(Cpu_number cpu) FIASCO_INIT_CPU_AND_PM;
16
17   /**
18    * Initialize the system clock.
19    */
20   static void init_system_clock();
21
22   /**
23    * Advances the system clock.
24    */
25   static void update_system_clock(Cpu_number cpu);
26
27   /**
28    * Get the current system clock.
29    */
30   static Unsigned64 system_clock();
31
32   /**
33    * reprogram the one-shot timer to the next event.
34    */
35   static void update_timer(Unsigned64 wakeup);
36
37   /**
38    * enable the timer
39    */
40   static void enable();
41
42   static void master_cpu(Cpu_number cpu) { _cpu = cpu; }
43
44 private:
45   static Cpu_number _cpu;
46 };
47
48
49 IMPLEMENTATION:
50
51 Cpu_number Timer::_cpu;
52
53 IMPLEMENT_DEFAULT
54 void
55 Timer::enable()
56 {}