output cleanup + wait for enter
This commit is contained in:
13
c_os/main.cc
13
c_os/main.cc
@ -12,6 +12,7 @@
|
||||
|
||||
#include "kernel/Globals.h"
|
||||
#include "kernel/Paging.h"
|
||||
#include "lib/Input.h"
|
||||
#include "user/MainMenu.h"
|
||||
|
||||
void print_startup_message() {
|
||||
@ -31,6 +32,7 @@ void print_startup_message() {
|
||||
|
||||
<< " - Einfache (Tastatur-)Eventverwaltung\n"
|
||||
<< " - Serial Output Logging\n"
|
||||
<< "\nPress Enter to continue to menu\n"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -39,11 +41,6 @@ int main() {
|
||||
Logger::disable_kout();
|
||||
Logger::enable_serial();
|
||||
|
||||
kout.clear();
|
||||
|
||||
// Startmeldung
|
||||
print_startup_message();
|
||||
|
||||
// Speicherverwaltung initialisieren
|
||||
allocator.init();
|
||||
|
||||
@ -58,6 +55,12 @@ int main() {
|
||||
// This has to happen after the allocator is initialized but before the scheduler is started
|
||||
pg_init();
|
||||
|
||||
// Startmeldung
|
||||
kout.clear();
|
||||
print_startup_message();
|
||||
// NOTE: Because this is blocking with an empty loop we have to disable optimizations (at least on my compiler version)
|
||||
waitForReturn();
|
||||
|
||||
// Scheduler starten (schedule() erzeugt den Idle-Thread)
|
||||
scheduler.ready(new MainMenu()); // NOTE: A thread that manages other threads has to be added before scheduler.schedule(),
|
||||
// because scheduler.schedule() doesn't return, only threads get cpu time
|
||||
|
Reference in New Issue
Block a user