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/Globals.h"
|
||||||
#include "kernel/Paging.h"
|
#include "kernel/Paging.h"
|
||||||
|
#include "lib/Input.h"
|
||||||
#include "user/MainMenu.h"
|
#include "user/MainMenu.h"
|
||||||
|
|
||||||
void print_startup_message() {
|
void print_startup_message() {
|
||||||
@ -31,6 +32,7 @@ void print_startup_message() {
|
|||||||
|
|
||||||
<< " - Einfache (Tastatur-)Eventverwaltung\n"
|
<< " - Einfache (Tastatur-)Eventverwaltung\n"
|
||||||
<< " - Serial Output Logging\n"
|
<< " - Serial Output Logging\n"
|
||||||
|
<< "\nPress Enter to continue to menu\n"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +41,6 @@ int main() {
|
|||||||
Logger::disable_kout();
|
Logger::disable_kout();
|
||||||
Logger::enable_serial();
|
Logger::enable_serial();
|
||||||
|
|
||||||
kout.clear();
|
|
||||||
|
|
||||||
// Startmeldung
|
|
||||||
print_startup_message();
|
|
||||||
|
|
||||||
// Speicherverwaltung initialisieren
|
// Speicherverwaltung initialisieren
|
||||||
allocator.init();
|
allocator.init();
|
||||||
|
|
||||||
@ -58,6 +55,12 @@ int main() {
|
|||||||
// This has to happen after the allocator is initialized but before the scheduler is started
|
// This has to happen after the allocator is initialized but before the scheduler is started
|
||||||
pg_init();
|
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 starten (schedule() erzeugt den Idle-Thread)
|
||||||
scheduler.ready(new MainMenu()); // NOTE: A thread that manages other threads has to be added before scheduler.schedule(),
|
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
|
// because scheduler.schedule() doesn't return, only threads get cpu time
|
||||||
|
|||||||
Reference in New Issue
Block a user