os161-1.99
 All Data Structures
config.h
00001 /*
00002  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
00003  *      The President and Fellows of Harvard College.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the University nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  */
00029 
00030 /*
00031  * Note: if the assumptions in the constants below are violated by
00032  * your system design, please change the values as necessary. Don't
00033  * change stuff in the .c files, or disable tests, without consulting
00034  * the course staff first.
00035  */
00036 
00037 #if defined(__mips__)
00038 #define KERN_PTR        ((void *)0x80000000)    /* addr within kernel */
00039 #define INVAL_PTR       ((void *)0x40000000)    /* addr not part of program */
00040 #else
00041 #error "Please fix this"
00042 #endif
00043 
00044 /*
00045  * We assume CLOSED_FD is a legal fd that won't be open when we're running.
00046  * CLOSED_FD+1 should also be legal and not open.
00047  */
00048 #define CLOSED_FD               10
00049 
00050 /* We assume IMPOSSIBLE_FD is a fd that is completely not allowed. */
00051 #define IMPOSSIBLE_FD           1234567890
00052 
00053 /* We assume this pid won't exist while we're running. Change as needed. */
00054 #define NONEXIST_PID            34000
00055 
00056 /* The symbolic error code for no such process (ESRCH in unix) */
00057 #ifdef ESRCH
00058 #define NOSUCHPID_ERROR         ESRCH
00059 #else
00060 #define NOSUCHPID_ERROR         EINVAL
00061 #endif
00062 
00063 /* An arbitrary process exit code that hopefully won't occur by accident */
00064 #define MAGIC_STATUS            107
00065 
00066 /* An ioctl that doesn't exist */
00067 #define NONEXIST_IOCTL          12345
 All Data Structures