diff --git a/src/bin/ubistry/main.c b/src/bin/ubistry/main.c index 96dfec0..2321a56 100644 --- a/src/bin/ubistry/main.c +++ b/src/bin/ubistry/main.c @@ -36,7 +36,6 @@ 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); @@ -57,6 +56,11 @@ /*** $Log$ + Revision 1.8 2004/07/17 16:43:10 reddawg + shell: fixed stress testing + ubistry: fixed some segfaults + spinlock: added assert() + Revision 1.7 2004/06/17 15:10:55 reddawg Fixed Some Global Variables diff --git a/src/lib/libc_old/sys/exec.c b/src/lib/libc_old/sys/exec.c index 88e9ea6..47dc7b5 100644 --- a/src/lib/libc_old/sys/exec.c +++ b/src/lib/libc_old/sys/exec.c @@ -28,8 +28,8 @@ *****************************************************************************************/ int exec(char *file,int argc,char **argv) { - int status = 0x1; - asm( + volatile int status = 0x1; + asm volatile( "int %0 \n" : : "i" (0x80),"a" (3),"b" (file),"c" (argc),"d" (argv) ); @@ -38,6 +38,9 @@ /*** $Log$ + Revision 1.3 2004/08/01 20:14:18 reddawg + Fixens + Revision 1.2 2004/08/01 19:59:19 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/fork.c b/src/lib/libc_old/sys/fork.c index 89ab04d..d36fe6c 100644 --- a/src/lib/libc_old/sys/fork.c +++ b/src/lib/libc_old/sys/fork.c @@ -31,8 +31,8 @@ #include pid_t fork() { - pid_t pid = 0x0; - asm( + volatile pid_t pid = 0x0; + asm volatile( "pushl %%eax\n" "pushl %%ecx\n" "movl $4,%%eax\n" @@ -48,11 +48,15 @@ : : "b" (&pid) ); + return(pid); } /*** $Log$ + Revision 1.3 2004/08/01 20:14:18 reddawg + Fixens + Revision 1.2 2004/08/01 19:59:19 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/getgid.c b/src/lib/libc_old/sys/getgid.c index a3b4922..0c387fd 100644 --- a/src/lib/libc_old/sys/getgid.c +++ b/src/lib/libc_old/sys/getgid.c @@ -30,8 +30,8 @@ #include int getgid(void) { - int gid = 0x0; - asm( + volatile int gid = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (32),"b" (&gid) ); @@ -40,6 +40,9 @@ /*** $Log$ + Revision 1.3 2004/08/01 20:14:18 reddawg + Fixens + Revision 1.2 2004/08/01 19:59:19 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/getpage.c b/src/lib/libc_old/sys/getpage.c index b2d333c..005a7c1 100644 --- a/src/lib/libc_old/sys/getpage.c +++ b/src/lib/libc_old/sys/getpage.c @@ -31,7 +31,7 @@ void *getPage(int count) { - uInt32 pageAddr = 0x0; + volatile uInt32 pageAddr = 0x0; asm volatile( "int %0 \n" : : "i" (0x80),"a" (7),"b" (&pageAddr),"c" (count) @@ -41,6 +41,9 @@ /*** $Log$ + Revision 1.4 2004/08/01 20:14:18 reddawg + Fixens + Revision 1.3 2004/08/01 19:59:19 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/getpid.c b/src/lib/libc_old/sys/getpid.c index e290cbe..2a582aa 100644 --- a/src/lib/libc_old/sys/getpid.c +++ b/src/lib/libc_old/sys/getpid.c @@ -30,8 +30,8 @@ #include int getpid(void) { - int pid = 0x0; - asm( + volatile int pid = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (1),"b" (&pid) ); @@ -40,6 +40,9 @@ /*** $Log$ + Revision 1.3 2004/08/01 20:14:18 reddawg + Fixens + Revision 1.2 2004/08/01 19:59:19 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/gettime.c b/src/lib/libc_old/sys/gettime.c index 8a753bc..c66dd33 100644 --- a/src/lib/libc_old/sys/gettime.c +++ b/src/lib/libc_old/sys/gettime.c @@ -1,34 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int gettime(void) { - int time = 0x0; - asm( + volatile int time = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (47),"b" (&time) ); return(time); } +/*** + $Log$ + END + ***/ diff --git a/src/lib/libc_old/sys/getuid.c b/src/lib/libc_old/sys/getuid.c index 6153b64..dc182ea 100644 --- a/src/lib/libc_old/sys/getuid.c +++ b/src/lib/libc_old/sys/getuid.c @@ -1,33 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int getuid(void) { - int uid = 0x0; - asm( + volatile int uid = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (31),"b" (&uid) ); return(uid); - } \ No newline at end of file + } + +/*** + $Log$ + END + ***/ diff --git a/src/lib/libc_old/sys/getuptime.c b/src/lib/libc_old/sys/getuptime.c index bf536cf..ff43b71 100644 --- a/src/lib/libc_old/sys/getuptime.c +++ b/src/lib/libc_old/sys/getuptime.c @@ -1,34 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ - +*****************************************************************************************/ #include int getuptime(void) { - int uptime = 0x0; - asm( + volatile int uptime = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (46),"b" (&uptime) ); return(uptime); } +/*** + $Log$ + END + ***/ + diff --git a/src/lib/libc_old/sys/mmap.c b/src/lib/libc_old/sys/mmap.c index a3fb470..566cb11 100644 --- a/src/lib/libc_old/sys/mmap.c +++ b/src/lib/libc_old/sys/mmap.c @@ -1,25 +1,31 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include diff --git a/src/lib/libc_old/sys/mpi.c b/src/lib/libc_old/sys/mpi.c index 8c785b0..3b05990 100644 --- a/src/lib/libc_old/sys/mpi.c +++ b/src/lib/libc_old/sys/mpi.c @@ -30,8 +30,8 @@ #include int mpiCreateMbox(char *name) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (50),"b" (&status),"c" (name) ); @@ -40,8 +40,8 @@ } int mpiDestroyMbox(char *name) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (51),"b" (&status),"c" (name) ); @@ -50,7 +50,7 @@ } int mpiPostMessage(char *name,uInt32 type,void *data) { - asm( + asm volatile( "int %0\n" : : "i" (0x80),"a" (52),"b" (name),"c" (&type),"d" (data) ); @@ -58,8 +58,8 @@ } int mpiFetchMessage(char *name,mpiMessage_t *msg) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (53),"b" (name),"c" (msg),"d" (&status) ); @@ -67,8 +67,8 @@ } int mpiSpam(uInt32 type,void *data) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (54),"b" (type),"c" (data),"d" (&status) ); @@ -77,6 +77,9 @@ /*** $Log$ + Revision 1.2 2004/05/26 15:39:22 reddawg + mpi: brought mpiDestroyMbox(char *name) in to the userland + Revision 1.1 2004/05/25 15:43:27 reddawg Added Userland MPI access diff --git a/src/lib/libc_old/sys/pidstatus.c b/src/lib/libc_old/sys/pidstatus.c index acbb836..ca7b425 100644 --- a/src/lib/libc_old/sys/pidstatus.c +++ b/src/lib/libc_old/sys/pidstatus.c @@ -1,33 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int pidStatus(int pid) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (6),"b" (pid),"c" (&status) ); return(status); } + +/*** + $Log$ + END + ***/ diff --git a/src/lib/libc_old/sys/sched.c b/src/lib/libc_old/sys/sched.c index 7e53359..17af95d 100644 --- a/src/lib/libc_old/sys/sched.c +++ b/src/lib/libc_old/sys/sched.c @@ -3,8 +3,8 @@ int sched_yield(void) { - int return_val = 0; - asm( + volatile int return_val = 0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (11) ); diff --git a/src/lib/libc_old/sys/setgid.c b/src/lib/libc_old/sys/setgid.c index 6014b59..23760b8 100644 --- a/src/lib/libc_old/sys/setgid.c +++ b/src/lib/libc_old/sys/setgid.c @@ -1,33 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int setgid(int gid) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (34),"b" (gid),"c" (&status) ); return(status); - } \ No newline at end of file + } + +/*** + $Log$ + END + ***/ diff --git a/src/lib/libc_old/sys/setuid.c b/src/lib/libc_old/sys/setuid.c index 1fe8c07..0e80364 100644 --- a/src/lib/libc_old/sys/setuid.c +++ b/src/lib/libc_old/sys/setuid.c @@ -1,33 +1,44 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int setuid(int uid) { - int status = 0x0; - asm( + volatile int status = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (33),"b" (uid),"c" (&status) ); return(status); - } \ No newline at end of file + } + +/*** + $Log$ + END + ***/ diff --git a/src/lib/libc_old/sys/startsde.c b/src/lib/libc_old/sys/startsde.c index dc922e9..d96bb02 100644 --- a/src/lib/libc_old/sys/startsde.c +++ b/src/lib/libc_old/sys/startsde.c @@ -1,34 +1,45 @@ -/************************************************************************************** - Copyright (c) 2002 The UbixOS Project +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors -in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ -**************************************************************************************/ +*****************************************************************************************/ #include int startSDE(void) { - int time = 0x0; - asm( + volatile int time = 0x0; + asm volatile( "int %0\n" : : "i" (0x80),"a" (48) ); return(time); } +/*** + $Log$ + END + ***/ + diff --git a/src/sys/kernel/fork.c b/src/sys/kernel/fork.c index aeed0d5..29bb3eb 100644 --- a/src/sys/kernel/fork.c +++ b/src/sys/kernel/fork.c @@ -102,13 +102,18 @@ /* Create A Copy Of The VM Space For New Task */ newProcess->tss.cr3 = (uInt32)vmmCopyVirtualSpace(newProcess->id); newProcess->state = FORK; + while (newProcess->state == FORK); + /* Return Id of Proccess */ return(newProcess->id); } /*** $Log$ + Revision 1.17 2004/07/29 21:32:16 reddawg + My quick lunchs breaks worth of updates.... + Revision 1.16 2004/07/28 00:17:05 reddawg Major: Disconnected page 0x0 from the system... Unfortunately this broke many things diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index 7df19a2..6eb73cf 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -149,6 +149,7 @@ _current = tmpTask; if (_current->state == FORK) _current->state = READY; + break; } /* @@ -326,6 +327,9 @@ /*** $Log$ + Revision 1.25 2004/08/01 20:24:51 reddawg + Fixens + Revision 1.24 2004/08/01 17:50:46 reddawg Fixens