diff --git a/src/sys/include/ubixos/sched.h b/src/sys/include/ubixos/sched.h index 0a72476..1c92c9f 100644 --- a/src/sys/include/ubixos/sched.h +++ b/src/sys/include/ubixos/sched.h @@ -84,9 +84,8 @@ int sched_init(); int sched_setStatus(pidType,tState); void sched(); +void sched_yield(); - -void schedYield(); void schedEndTask(pidType pid); kTask_t *schedNewTask(); kTask_t *schedFindTask(uInt32 id); @@ -103,6 +102,9 @@ /*** $Log$ + Revision 1.18 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.16 2004/08/04 08:17:57 reddawg tty: we have primative ttys try f1-f5 so it is easier to use and debug ubixos diff --git a/src/sys/init/main.c b/src/sys/init/main.c index dc3c018..11712c7 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -106,9 +106,11 @@ execThread(systemTask,(uInt32)(kmalloc(0x2000)+0x2000),0x0); execFile("sys:/init",0x0,0x0,0x0); execFile("sys:/login",0x0,0x0,0x1); + execFile("sys:/login",0x0,0x0,0x2); execFile("sys:/login",0x0,0x0,0x3); execFile("sys:/login",0x0,0x0,0x4); + kprintf("Free Pages: [%i]\n",systemVitals->freePages); kprintf("MemoryMap: [0x%X]\n",vmmMemoryMap); kprintf("Starting Os\n"); @@ -119,6 +121,10 @@ /*** $Log$ + Revision 1.68 2004/08/04 08:17:57 reddawg + tty: we have primative ttys try f1-f5 so it is easier to use and debug + ubixos + Revision 1.67 2004/08/03 18:31:19 reddawg virtual terms diff --git a/src/sys/kernel/endtask.c b/src/sys/kernel/endtask.c index eade31f..963d975 100644 --- a/src/sys/kernel/endtask.c +++ b/src/sys/kernel/endtask.c @@ -48,12 +48,15 @@ fclose(_current->imageFd); //kprintf("FreePage: [0x%X]\n",systemVitals->freePages); sched_setStatus(_current->id,DEAD); - schedYield(); + sched_yield(); return; } /*** $Log$ + Revision 1.14 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.12 2004/08/03 18:31:19 reddawg virtual terms diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index 63e213c..7aceeb4 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -152,16 +152,6 @@ break; } -/* - else if (tmpTask->state == DEAD) { - if (tmpTask == _current) - kpanic("unhandled situation"); - if (schedDeleteTask(tmpTask->id) != 0x0) { - kpanic("Error: schedDeleteTask");; - } - goto schedStart; - } -*/ } /* Finished all the tasks, restarting the list */ @@ -289,7 +279,7 @@ void schedEndTask(pidType pid) { endTask(_current->id); - schedYield(); + sched_yield(); } /************************************************************************ @@ -303,11 +293,21 @@ 02/20/2004 - Approved for quality ************************************************************************/ + void -schedYield() { +sched_yield() { sched(); } +/* +asm( + ".globl sched_yield \n" + "sched_yield: \n" + " cli \n" + " call sched \n" + ); +*/ + /************************************************************************ Function: int sched_setStatus(pidType pid,tState state) @@ -327,6 +327,9 @@ /*** $Log$ + Revision 1.28 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.26 2004/08/02 18:50:13 reddawg Updates to make some variable volatile to make work with gcc 3.3. However there are still some issues but we have not caused new issues with gcc 2.95 diff --git a/src/sys/kernel/syscall.c b/src/sys/kernel/syscall.c index c891fc5..03497e8 100644 --- a/src/sys/kernel/syscall.c +++ b/src/sys/kernel/syscall.c @@ -160,7 +160,7 @@ } void sysSchedYield() { - schedYield(); + sched_yield(); } void sysStartSDE() { @@ -177,6 +177,9 @@ /*** $Log$ + Revision 1.26 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.24 2004/07/28 17:07:25 reddawg MPI: moved the syscalls diff --git a/src/sys/kernel/systemtask.c b/src/sys/kernel/systemtask.c index 16c38f4..e26e93b 100644 --- a/src/sys/kernel/systemtask.c +++ b/src/sys/kernel/systemtask.c @@ -57,7 +57,7 @@ counter = systemVitals->sysUptime + 5; while (systemVitals->sysUptime < counter) { //asm("hlt"); - schedYield(); + sched_yield(); } kprintf("Rebooting NOW!!!\n"); while(inportByte(0x64) & 0x02); @@ -85,13 +85,16 @@ break; } } - schedYield(); + sched_yield(); } return; } /*** $Log$ + Revision 1.10 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.8 2004/07/28 17:07:25 reddawg MPI: moved the syscalls diff --git a/src/sys/kernel/ubthread.c b/src/sys/kernel/ubthread.c index 6c1e241..9200f40 100644 --- a/src/sys/kernel/ubthread.c +++ b/src/sys/kernel/ubthread.c @@ -107,7 +107,7 @@ uInt32 enterTime = systemVitals->sysUptime+20; while (enterTime > systemVitals->sysUptime) { if (ubcond->locked == UNLOCKED) break; - schedYield(); + sched_yield(); } ubmutex->locked = UNLOCKED; return(0x0); @@ -129,6 +129,9 @@ /*** $Log$ + Revision 1.9 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.7 2004/07/28 22:23:02 reddawg make sure it still works before I goto bed diff --git a/src/sys/sys/idt.c b/src/sys/sys/idt.c index 34d4113..509bb44 100644 --- a/src/sys/sys/idt.c +++ b/src/sys/sys/idt.c @@ -186,49 +186,49 @@ kpanic("Invalid Interrupt[%i]\n",_current->id); while (1); endTask(_current->id); - schedYield(); + sched_yield(); } void _int0() { kpanic("int0: Divide-by-Zero [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int1() { kpanic("int1: Debug exception [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int2() { kpanic("int2: unknown error [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int3() { kpanic("int3: Breakpoint [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int4(){ kpanic("int4: Overflow [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int5() { kpanic("int5: Bounds check [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int6() { kpanic("int6: Invalid opcode! [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int8() { @@ -252,25 +252,25 @@ void _int9() { kpanic("int9: Coprocessor Segment Overrun! [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int10() { kpanic("int10: Invalid TSS! [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int11() { kpanic("int11: Segment Not Present! [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int12() { kpanic("int12: Stack-Segment Fault! [%i]\n",_current->id); endTask(_current->id); - schedYield(); + sched_yield(); } void _int13() { @@ -457,6 +457,9 @@ /*** $Log$ + Revision 1.29 2004/08/06 22:32:16 reddawg + Ubix Works Again + Revision 1.27 2004/08/01 17:50:46 reddawg Fixens