Stuff
This commit is contained in:
parent
feee90c3d0
commit
f82fe88dab
|
@ -22,6 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <extras/buf.h>
|
||||
#include <kernel/mboot.h>
|
||||
#include <kernel/panic.h>
|
||||
#include <kernel/sched.h>
|
||||
|
@ -150,8 +151,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic)
|
|||
MmInitHeap();
|
||||
PsInitSched();
|
||||
|
||||
KeStartPanic("Test Panic %x", 4);
|
||||
pstest();
|
||||
|
||||
// End this machine's suffering
|
||||
BFlushBuf(BStdOut);
|
||||
KeCrashSystem();
|
||||
}
|
||||
|
|
|
@ -81,10 +81,6 @@ void PsUnlockSched(void) {
|
|||
//
|
||||
// The four priority classes of OS/2
|
||||
//
|
||||
/*CREATE_PER_CPU(TimeCritProcs, ListHead_t *);
|
||||
CREATE_PER_CPU(ServPrioProcs, ListHead_t *);
|
||||
CREATE_PER_CPU(ReglPrioProcs, ListHead_t *);
|
||||
CREATE_PER_CPU(IdlePrioProcs, ListHead_t *);*/
|
||||
|
||||
const char *PsPrioClassesNames[] = {
|
||||
"Time-critical class",
|
||||
|
@ -177,9 +173,6 @@ void PsSchedThisProc(Process_t *proc)
|
|||
//
|
||||
// Selects process to schedule next
|
||||
//
|
||||
// WARNING
|
||||
// Does not call SchedLock()/SchedUnlock()
|
||||
//
|
||||
static Process_t *SelectSchedNext(void)
|
||||
{
|
||||
if (TimeCritProcs->length > 0)
|
||||
|
@ -293,7 +286,7 @@ leave:
|
|||
PsUnlockSched();
|
||||
|
||||
if (PsCurProc != NULL && PsCurProc != previous) {
|
||||
// XXX context switch
|
||||
// dispatch & context switch
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,7 +402,7 @@ void pstest(void)
|
|||
KernLog("Tick %d - Running: ", tick);
|
||||
|
||||
if (PsCurProc == NULL) {
|
||||
KernLog("IDLE");
|
||||
KernLog("IDLE\n");
|
||||
}
|
||||
|
||||
else {
|
||||
|
@ -419,7 +412,7 @@ void pstest(void)
|
|||
PsSchedOnTick();
|
||||
|
||||
if (tick == 50) // already done
|
||||
KernLog("Re-scheduling process 0");
|
||||
KernLog("Re-scheduling process 0\n");
|
||||
|
||||
tick++;
|
||||
}
|
||||
|
|
|
@ -285,13 +285,21 @@ error_t vbprintf(Buffer_t *buf, const char *fmt, va_list ap)
|
|||
if (width < 12) width = 12;
|
||||
}
|
||||
|
||||
// Unknown/unsupported modifier
|
||||
// Note: a '\0' after length field falls here
|
||||
else {
|
||||
// End of string too soon
|
||||
else if (type == '\0') {
|
||||
bputc(buf, '%');
|
||||
rc = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
// Unknown/unsupported modifier
|
||||
else {
|
||||
bputc(buf, '%');
|
||||
bputc(buf, '?');
|
||||
rc = bputc(buf, type);
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Numerical conversions
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue