1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub trait Device: Send {}

///
/// ## Initialization
/// The system is expected to initialize:
///  - the CPU
///  - the memory allocator
pub trait System: Device
{
  /// Called to shutdown the system
  fn shutdown(&self);

  fn idle_if<T: Fn() -> bool>(&self, cond: T);

  fn wait_forever(&self) -> !;

  fn disable_interruptions(&self);
  fn enable_interruptions(&self);
}