void comhandle() { serial_println(""); serial_println("Welcome to the MPX OS."); serial_println("Feel free to begin entering commands."); serial_println(""); while(1) { char *command = polling(); if (!strcmpigncase(command, "shutdown")) { if (shutdownConfirmed()) { serial_println("System shutting down..."); clearAllQueues(); break; } else { serial_println("Shutdown canceled."); } } else if (!strcmpigncase(command, "version")) { version(); } else if (!strcmpigncase(command, "help")) { help(); } else if (!strcmpigncase(command, "setdate")) { setdate(); } else if (!strcmpigncase(command, "getdate")) { getdate(); } else if (!strcmpigncase(command, "settime")) { settime(); } else if (!strcmpigncase(command, "gettime")) { gettime(); } else if (!strcmpigncase(command, "suspend")) { suspendPCB(); } else if (!strcmpigncase(command, "resume")) { resumePCB(); } else if (!strcmpigncase(command, "setpriority")) { setPriority(); } else if (!strcmpigncase(command, "showPCB")) { showPCB(); } else if (!strcmpigncase(command, "showReady")) { showReady(); } else if (!strcmpigncase(command, "showBlocked")) { showBlocked(); } else if (!strcmpigncase(command, "showAll")) { showAll(); } else if (!strcmpigncase(command, "yield")) { asm volatile ("int $60"); serial_println(""); } else if (!strcmpigncase(command, "loadr3")) { loadR3(); } else if (strcmp(command, '\0')) { serial_println("Command not recognized. Type help to view commands."); serial_println(""); } sys_free_mem(command); }
void showAll(){ //shows all the states //prints the ready/blocked state and suspended ready/blocked state showReady(); showBlocked(); if(COP!=NULL){ print("Running PCB:\n"); showPCB(COP->processName); } else{ print("No Running PCBs\n"); } }
void showAll() { showReady(); showBlocked(); }