]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/platform_control.cpp
update
[l4.git] / kernel / fiasco / src / kern / platform_control.cpp
1 INTERFACE:
2
3 class Platform_control
4 {
5 public:
6   static void init(unsigned);
7   static bool cpu_offline_available();
8   static int resume_cpu(unsigned cpu);
9   static int suspend_cpu(unsigned cpu);
10   static int system_suspend();
11 };
12
13 // ------------------------------------------------------------------------
14 IMPLEMENTATION [!cpu_suspend]:
15
16 #include "l4_types.h"
17
18 IMPLEMENT inline
19 void
20 Platform_control::init(unsigned)
21 {}
22
23 IMPLEMENT inline NEEDS["l4_types.h"]
24 int
25 Platform_control::system_suspend()
26 { return -L4_err::EBusy; }
27
28 // ------------------------------------------------------------------------
29 IMPLEMENTATION [!cpu_suspend || !mp]:
30
31 #include "l4_types.h"
32
33 IMPLEMENT inline
34 bool
35 Platform_control::cpu_offline_available()
36 { return false; }
37
38 IMPLEMENT inline NEEDS["l4_types.h"]
39 int
40 Platform_control::suspend_cpu(unsigned)
41 { return -L4_err::ENodev; }
42
43 IMPLEMENT inline NEEDS["l4_types.h"]
44 int
45 Platform_control::resume_cpu(unsigned)
46 { return -L4_err::ENodev; }