diff --git a/src/Makefile.inc b/src/Makefile.inc index 935fc6c..8a14d34 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -2,8 +2,8 @@ # Global 'Source' Options # allow you to change your default compiler without affecting your other work -CC = gcc -CXX = g++ +CC = gcc295 +CXX = g++295 LD = ld AR = ar REMOVE = rm -rf diff --git a/src/bin/init/main.c b/src/bin/init/main.c index c86268a..b9fa910 100644 --- a/src/bin/init/main.c +++ b/src/bin/init/main.c @@ -70,9 +70,13 @@ printf("Error: Error Starting ubistry\n"); exit(0x0); } + while (pidStatus(i) > 0x0) { sched_yield(); - } + } + + printf("test-init\n"); + while (1); startup: i = fork(); @@ -99,6 +103,7 @@ sched_yield(); } printf("login exited?"); + goto startup; return(0x0); @@ -106,6 +111,9 @@ /*** $Log$ + Revision 1.24 2004/08/25 22:02:41 reddawg + task switching - We now are using software switching to be consistant with the rest of the world because all of this open source freaks gave me a hard time about something I liked. There doesn't seem to be any gain in performance but it is working fine and flawlessly + Revision 1.23 2004/08/24 23:33:45 reddawg Fixed diff --git a/src/bin/ubistry/main.c b/src/bin/ubistry/main.c index 2321a56..1987b05 100644 --- a/src/bin/ubistry/main.c +++ b/src/bin/ubistry/main.c @@ -36,8 +36,8 @@ int main(int argc,char **argv) { //FILE *pidFile; + if (fork() != 0x0) { - sched_yield(); /* This Fixed our segfault issue how ever it is the result of a deeper issue */ exit(0x0); } @@ -56,6 +56,9 @@ /*** $Log$ + Revision 1.9 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 + Revision 1.8 2004/07/17 16:43:10 reddawg shell: fixed stress testing ubistry: fixed some segfaults diff --git a/src/sys/include/ubixos/sched.h b/src/sys/include/ubixos/sched.h index cf6c699..04d8a33 100644 --- a/src/sys/include/ubixos/sched.h +++ b/src/sys/include/ubixos/sched.h @@ -51,18 +51,18 @@ }; typedef struct taskStruct { - pidType id; + pidType id; struct taskStruct *prev; struct taskStruct *next; - struct tssStruct tss; - struct i387Struct i387; - struct osInfo oInfo; - fileDescriptor *imageFd; - tState state; - uInt32 gid; - uInt32 uid; - uInt16 usedMath; - tty_term *term; + struct tssStruct tss; + struct i387Struct i387; + struct osInfo oInfo; + fileDescriptor *imageFd; + tState state; + uInt32 gid; + uInt32 uid; + uInt16 usedMath; + tty_term *term; } kTask_t; @@ -86,6 +86,9 @@ /*** $Log$ + Revision 1.28 2004/09/08 22:16:02 reddawg + Fixens + Revision 1.27 2004/09/08 21:19:32 reddawg All good now diff --git a/src/sys/isa/atkbd.c b/src/sys/isa/atkbd.c index 6696f95..2cc9044 100644 --- a/src/sys/isa/atkbd.c +++ b/src/sys/isa/atkbd.c @@ -47,7 +47,7 @@ static uInt16 stdinSize; static uInt32 controlKeys = 0x0; -static unsigned int keyboardMap[][8] = { +static unsigned int keyboardMap[255][8] = { /* Ascii, Shift, Ctrl, Alt, Num, Caps, Shift Caps, Shift Num */ { 0, 0, 0, 0, 0, 0, 0, 0}, /* ESC */ { 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B}, @@ -339,6 +339,9 @@ /*** $Log$ + Revision 1.27 2004/09/07 21:54:38 reddawg + ok reverted back to old scheduling for now.... + Revision 1.26 2004/09/06 22:18:52 reddawg ok bed time diff --git a/src/sys/kernel/file.c b/src/sys/kernel/file.c index 8a15403..6923fbd 100644 --- a/src/sys/kernel/file.c +++ b/src/sys/kernel/file.c @@ -36,6 +36,7 @@ #include #include #include +#include fileDescriptor *fdTable = 0x0; @@ -105,17 +106,18 @@ } size_t fread(void *ptr,int size,int nmemb,fileDescriptor *fd) { - fileDescriptor *tmpFd = 0x0; - /* Search For File Descriptor */ - for (tmpFd=fdTable;tmpFd;tmpFd=tmpFd->next) { - /* If Found Return Next Char */ - if (tmpFd == fd) { - if (nmemb == 0x0) nmemb = 1; //Temp Fix - tmpFd->mp->fs->vfsRead(tmpFd,ptr,tmpFd->offset,size * nmemb); - tmpFd->offset += size * nmemb; - } - } - return(0x0); + + if (fd == 0x0) + return(0x0); + + if (nmemb == 0x0) nmemb = 1; //Temp Fix + assert(fd); + //kprintf("fd->fileName: %s:%i\n",fd->fileName,_current->id); + assert(fd->mp); + assert(fd->mp->fs); + fd->mp->fs->vfsRead(fd,ptr,fd->offset,size * nmemb); + fd->offset += size * nmemb; + return(size * nmemb); } size_t fwrite(void *ptr,int size,int nmemb,fileDescriptor *fd) { @@ -290,6 +292,9 @@ /*** $Log$ + Revision 1.15 2004/08/09 12:58:05 reddawg + let me know when you got the surce + Revision 1.14 2004/08/09 05:40:31 reddawg tty: removed current and made a foreground diff --git a/src/sys/kernel/syscall.c b/src/sys/kernel/syscall.c index 2b72c26..022bd96 100644 --- a/src/sys/kernel/syscall.c +++ b/src/sys/kernel/syscall.c @@ -172,8 +172,7 @@ } void sysSchedYield() { - //asm("int $0x69"); - asm("hlt"); + sched_yield(); } void sysStartSDE() { @@ -190,6 +189,9 @@ /*** $Log$ + Revision 1.30 2004/09/08 22:16:02 reddawg + Fixens + Revision 1.29 2004/08/29 21:43:06 reddawg sched: we now yeild almost propper syscall: it still uses ebx,ecx,edx diff --git a/src/sys/kernel/systemtask.c b/src/sys/kernel/systemtask.c index 343b279..446a759 100644 --- a/src/sys/kernel/systemtask.c +++ b/src/sys/kernel/systemtask.c @@ -96,16 +96,16 @@ } tmpTask = sched_getDelTask(); if (tmpTask != 0x0) { - kprintf("Deleting Task: %i\n",tmpTask->id); + //kprintf("Deleting Task: %i\n",tmpTask->id); vmmFreeProcessPages(tmpTask->id); - if (_current->imageFd) - fclose(_current->imageFd); + if (tmpTask->imageFd) + fclose(tmpTask->imageFd); - //kfree(tmpTask->oInfo.cwd); - //kfree(tmpTask); + kfree(tmpTask->oInfo.cwd); + kfree(tmpTask); } sched_yield(); @@ -116,6 +116,9 @@ /*** $Log$ + Revision 1.20 2004/09/08 22:16:02 reddawg + Fixens + Revision 1.19 2004/09/07 21:54:38 reddawg ok reverted back to old scheduling for now.... diff --git a/src/sys/lib/kmalloc.c b/src/sys/lib/kmalloc.c index 149c55d..0d65317 100644 --- a/src/sys/lib/kmalloc.c +++ b/src/sys/lib/kmalloc.c @@ -180,7 +180,7 @@ 03/05/03 - We Have A Problem It Seems The First Block Is Limit 0x0 ************************************************************************/ -#if 0 + static void mergeMemBlocks() { struct memDescriptor *tmpDesc1 = 0x0; struct memDescriptor *tmpDesc2 = 0x0; @@ -231,7 +231,7 @@ } return; } -#endif + /************************************************************************ @@ -273,6 +273,7 @@ if (usedKernDesc != 0x0) usedKernDesc->prev = tmpDesc1; usedKernDesc = tmpDesc1; + /* if (tmpDesc1->limit > (len + 32)) { tmpDesc2 = getEmptyDesc(); assert(tmpDesc2); @@ -281,16 +282,13 @@ tmpDesc2->baseAddr = tmpDesc1->baseAddr + len; tmpDesc2->next = 0x0; tmpDesc2->prev = 0x0; - if (tmpDesc2->limit <= 0x0) - //kprintf("kmalloc-1 tmpDesc2: [%i:%i:%i]\n",tmpDesc2->limit,tmpDesc1->limit,len); insertFreeDesc(tmpDesc2); - } + }*/ buf = (char *)tmpDesc1->baseAddr; for (i=0;ilimit;i++) { (char)buf[i] = (char)0x0; } spinUnlock(&mallocSpinLock); - //kprintf("baseAddr1[0x%X:0x%X]",tmpDesc1,tmpDesc1->baseAddr); return(tmpDesc1->baseAddr); } } @@ -381,6 +379,9 @@ /*** $Log$ + Revision 1.23 2004/09/06 15:13:25 reddawg + Last commit before FreeBSD 6.0 + Revision 1.22 2004/08/26 22:51:18 reddawg TCA touched me :( i think he likes men....