added shutdown

This commit is contained in:
2023-04-08 00:39:54 +02:00
parent f8f5f5e5c7
commit 14f7b6c6df
3 changed files with 25 additions and 7 deletions

View File

@@ -13,6 +13,10 @@ import kernel.peripherals.Peripherals.Peripheral;
import kernel.net.Net;
class Init {
@:allow(kernel.KernelEvents)
private static var mainEvent:MainEvent;
public static function initKernel() {
// Init singeltons here because haxe is confused about the order to create them.
Log.instance = new Log();
@@ -44,9 +48,8 @@ class Init {
FS.makeDir("/var/ns");
}
MainLoop.add(()->{
Init.mainEvent = MainLoop.add(()->{
KernelEvents.instance.startEventLoop();
});
}
}