diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index 8e6c69b..14586a3 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -138,28 +138,19 @@ } -void -sched() -{ - uInt32 memAddr = 0x0; - kTask_t *tmpTask = 0x0; - struct tssStruct *gpfTSS = (struct tssStruct *)0x4200; +void sched(){ + uInt32 memAddr = 0x0; + kTask_t *tmpTask = 0x0; - - gpfTSS->eip = (unsigned int)&_int13; - gpfTSS->esp = 0x1D000; - gpfTSS->ebp = 0x1D000; - gpfTSS->eflags = 0x206; - - schedStart: - /* Yield the next task from the current prio queue */ - for (tmpTask = _current->next; tmpTask; tmpTask = tmpTask->next) { - if (tmpTask->state > 0x0) { - _current = tmpTask; - if (_current->state == FORK) - _current->state = READY; - break; - } + schedStart: + /* Yield the next task from the current prio queue */ + for (tmpTask = _current->next; tmpTask; tmpTask = tmpTask->next) { + if (tmpTask->state > 0x0) { + _current = tmpTask; + if (_current->state == FORK) + _current->state = READY; + break; + } /* else if (tmpTask->state == DEAD) { if (tmpTask == _current) @@ -170,7 +161,7 @@ goto schedStart; } */ - } + } /* Finished all the tasks, restarting the list */ if (0x0 == tmpTask) { @@ -335,6 +326,9 @@ /*** $Log$ + Revision 1.23 2004/07/29 21:32:16 reddawg + My quick lunchs breaks worth of updates.... + Revision 1.22 2004/07/28 16:29:30 reddawg old sched back diff --git a/src/sys/sys/idt.c b/src/sys/sys/idt.c index 330a5d6..fa99ad9 100644 --- a/src/sys/sys/idt.c +++ b/src/sys/sys/idt.c @@ -278,9 +278,15 @@ uInt16 *stack = 0x0, *ivt = 0x0; uInt32 *stack32 = 0x0; bool isOperand32 = FALSE, isAddress32 = FALSE; + struct tssStruct *gpfTSS = (struct tssStruct *)0x4200; irqDisable(0x0); - + + gpfTSS->eip = (unsigned int)&_int13; + gpfTSS->esp = 0x1D000; + gpfTSS->ebp = 0x1D000; + gpfTSS->eflags = 0x206; + ip = FP_TO_LINEAR(_current->tss.cs, _current->tss.eip); ivt = (uInt16 *) 0x0; stack = (uInt16 *) FP_TO_LINEAR(_current->tss.ss,_current->tss.esp); @@ -451,6 +457,9 @@ /*** $Log$ + Revision 1.26 2004/07/31 21:52:17 reddawg + a few changes + Revision 1.25 2004/07/29 21:32:16 reddawg My quick lunchs breaks worth of updates....