2016-03-23 00:33:45 -04:00
|
|
|
/* Kernel.hh
|
|
|
|
* vim: set tw=80:
|
|
|
|
* Eryn Wells <eryn@erynwells.me>
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* Kernel object. This is the highest level object in the system.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __KERNEL_HH__
|
|
|
|
#define __KERNEL_HH__
|
|
|
|
|
|
|
|
#include "Attributes.hh"
|
2016-03-23 00:56:00 -04:00
|
|
|
#include "Console.hh"
|
2016-03-23 00:33:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
namespace kernel {
|
|
|
|
|
|
|
|
struct Kernel
|
|
|
|
{
|
2016-03-23 00:55:42 -04:00
|
|
|
static Kernel& systemKernel();
|
2016-03-23 00:33:45 -04:00
|
|
|
|
2016-03-23 00:56:00 -04:00
|
|
|
Kernel();
|
|
|
|
|
|
|
|
void initialize();
|
|
|
|
|
2016-03-23 00:33:45 -04:00
|
|
|
void panic(const char* msg, ...);
|
|
|
|
|
|
|
|
void halt() NORETURN;
|
2016-03-23 00:56:00 -04:00
|
|
|
|
2016-03-23 01:42:52 -04:00
|
|
|
Console& console();
|
|
|
|
|
2016-03-23 00:56:00 -04:00
|
|
|
private:
|
|
|
|
Console mConsole;
|
2016-03-23 00:33:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace kernel */
|
|
|
|
|
|
|
|
#endif /* __KERNEL_HH__ */
|