update main
This commit is contained in:
55
c_os/main.cc
55
c_os/main.cc
@ -14,30 +14,37 @@
|
||||
#include "kernel/Paging.h"
|
||||
#include "user/MainMenu.h"
|
||||
|
||||
int main() {
|
||||
kout.clear();
|
||||
|
||||
// Speicherverwaltung initialisieren
|
||||
allocator.init();
|
||||
|
||||
// Initialize SerialPort
|
||||
serial.init();
|
||||
|
||||
// Startmeldung
|
||||
kout << "HHUos 0.10\n"
|
||||
void print_startup_message() {
|
||||
kout << "BSEos 1.0\n"
|
||||
<< "==========\n"
|
||||
<< "Unterstuetzte Funktionen:\n"
|
||||
<< " - Bildschirmausgaben\n"
|
||||
<< " - Sound ueber den PC-Lautsprecher\n"
|
||||
<< " - Tastatureingaben per Abfrage\n"
|
||||
<< " - Einfache Heap verwaltung\n"
|
||||
<< " - Einfache Heapverwaltung\n"
|
||||
<< " - Tastatureingaben per Interrupt\n"
|
||||
<< " - Kooperative Threads\n"
|
||||
<< " - VESA Graphics Mode\n"
|
||||
<< " - Einfaches Paging\n"
|
||||
<< " - Preemptive Threads\n"
|
||||
<< " - Einfache Synchronisierung\n"
|
||||
|
||||
<< " - Einfache (Tastatur-)Eventverwaltung\n"
|
||||
<< " - Serial Output Logging\n"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
kout.clear();
|
||||
|
||||
// Startmeldung
|
||||
print_startup_message();
|
||||
|
||||
// Speicherverwaltung initialisieren
|
||||
allocator.init();
|
||||
|
||||
// Initialize SerialPort
|
||||
serial.init();
|
||||
|
||||
// Tastatur-Unterbrechungsroutine 'einstoepseln'
|
||||
kb.plugin();
|
||||
@ -59,45 +66,43 @@ int main() {
|
||||
// because scheduler.schedule() doesn't return, only threads get cpu time
|
||||
scheduler.schedule();
|
||||
|
||||
// BUG: Timer interrupt preemption works normal at first, but after a time there is a heap of output
|
||||
// from the scheduler that is not triggered by PIT, I don't know why this occurs
|
||||
|
||||
// NOTE: Enforced ToDo's (needed)
|
||||
// DONE: Rewrite demos for threads
|
||||
// TODO: Make menu for demos
|
||||
// TODO: Thread switching stops after a while
|
||||
// TODO: Prefer deblocked thread and find out why it doesn't work
|
||||
// DONE: Thread switching stops after a while
|
||||
// TODO: Threads are not cleanup after exit, use managed pointer?
|
||||
//
|
||||
// NOTE: Main ToDo's (extra)
|
||||
// DONE: Basic event management for keyboard events so threads can utilize interrupt based inputs
|
||||
// This also works well with a blocked-queue in the scheduler for threads waiting for input
|
||||
//
|
||||
// TODO: Serial output, output graphviz dot data for memory etc.
|
||||
// DONE: Serial output
|
||||
// TODO: Output graphviz stuff over serial
|
||||
// TODO: Fix the damn TreeAllocator: Allow root deletion without bluescreen
|
||||
// Maybe just remove the red black tree stuff and replace with usual binary search tree?
|
||||
// I can just balance this tree unefficiantly by reinserting all nodes
|
||||
// TODO: Implement realloc so ArrayList can realloc instead of newly allocate bigger block
|
||||
// TODO: Array wrapper
|
||||
// TODO: Rewrite Logging with a basic (synchronized) logger
|
||||
// DONE: Rewrite Logging with a basic (synchronized) logger
|
||||
// TODO: String wrapper
|
||||
//
|
||||
// NOTE: Cleanup + Refactor
|
||||
// TODO: Use templates for queue so threads don't have to be casted down from chain
|
||||
// TODO: Change scheduler to only use references instead of pointers
|
||||
// TODO: Unify debug output format
|
||||
// TODO: Drawing Circles
|
||||
// DONE: Use templates for queue so threads don't have to be casted down from chain
|
||||
// TODO: Only use references instead of pointers where possible
|
||||
// DONE: Unify debug output format
|
||||
// TODO: Cleanup: Remove I added this... Notes, just leave explanations
|
||||
// TODO: Remove Math "lib" or do something with it
|
||||
// DONE: Remove Math "lib" or do something with it
|
||||
// TODO: Cleanup imports: Only import stuff in implementation when only needed there
|
||||
// TODO: Switch cpu_disableint() to semaphore etc (Spinlock in the scheduler?)
|
||||
// TODO: Change mylib types to not use T* but T and call with memcpy<Type*> instead of memcpy<Type>
|
||||
// TODO: Make more stuff const
|
||||
// TODO: Make more stuff const and static and static constexpr const
|
||||
// TODO: Remove ArrayList init and do this inside ArrayList when an operation on the list is done
|
||||
// TODO: Remove CoroutineState/ThreadState and just use pusha/popa, start/switch methods should
|
||||
// just get esp as argument
|
||||
// TODO: Kevman unsubscribe is needed, because exited threads will still be woken up by kevman
|
||||
// Or check if thread is still running
|
||||
// TODO: Delete copy constructors that weren't already deleted
|
||||
// DONE: Switch out semaphore Queue with ArrayList? Or switch back Scheduler to Queue?
|
||||
|
||||
// Scheduler doesn't return
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user