00001
00002 #ifndef CHIP
00003 #error CHIP is not defined
00004 #endif
00005
00006 #define EXTERN extern
00007 #define PRIVATE static
00008 #define PUBLIC
00009 #define FORWARD static
00010
00011 #define TRUE 1
00012 #define FALSE 0
00013
00014 #define DEFAULT_HZ 60
00015
00016 #define SUPER_USER (uid_t) 0
00017
00018 #define NULL ((void *)0)
00019 #define SCPVEC_NR 64
00020 #define NR_IOREQS 64
00021
00022
00023
00024 #define MESS_SIZE (sizeof(message))
00025 #define NIL_MESS ((message *) 0)
00026
00027
00028 #define SEGMENT_TYPE 0xFF00
00029 #define SEGMENT_INDEX 0x00FF
00030
00031 #define LOCAL_SEG 0x0000
00032 #define NR_LOCAL_SEGS 3
00033 #define T 0
00034 #define D 1
00035 #define S 2
00036
00037 #define REMOTE_SEG 0x0100
00038 #define NR_REMOTE_SEGS 3
00039
00040 #define BIOS_SEG 0x0200
00041 #define NR_BIOS_SEGS 3
00042
00043 #define PHYS_SEG 0x0400
00044
00045 #define LOCAL_VM_SEG 0x1000
00046 #define VM_D (LOCAL_VM_SEG | D)
00047 #define VM_T (LOCAL_VM_SEG | T)
00048 #define MEM_GRANT 3
00049 #define VM_GRANT (LOCAL_VM_SEG | MEM_GRANT)
00050
00051
00052 #define DEAD_CODE 0
00053 #define FUTURE_CODE 0
00054 #define TEMP_CODE 1
00055
00056
00057 #define PROC_NAME_LEN 16
00058
00059
00060 #define BYTE 0377
00061 #define READING 0
00062 #define WRITING 1
00063 #define NO_NUM 0x8000
00064 #define NIL_PTR (char *) 0
00065 #define HAVE_SCATTERED_IO 1
00066
00067
00068 #define MAX(a, b) ((a) > (b) ? (a) : (b))
00069 #define MIN(a, b) ((a) < (b) ? (a) : (b))
00070
00071
00072 #if (CHIP == INTEL)
00073 #define CLICK_SIZE 4096
00074 #define CLICK_SHIFT 12
00075 #endif
00076
00077 #if (CHIP == SPARC) || (CHIP == M68000)
00078 #define CLICK_SIZE 4096
00079 #define CLICK_SHIFT 12
00080 #endif
00081
00082
00083 #define CLICK_FLOOR(n) (((vir_bytes)(n) / CLICK_SIZE) * CLICK_SIZE)
00084 #define CLICK_CEIL(n) CLICK_FLOOR((vir_bytes)(n) + CLICK_SIZE-1)
00085
00086
00087
00088
00089
00090 #define NR_MEMS 8
00091
00092
00093
00094 #define HCLICK_SHIFT 4
00095 #define HCLICK_SIZE 16
00096 #if CLICK_SIZE >= HCLICK_SIZE
00097 #define click_to_hclick(n) ((n) << (CLICK_SHIFT - HCLICK_SHIFT))
00098 #else
00099 #define click_to_hclick(n) ((n) >> (HCLICK_SHIFT - CLICK_SHIFT))
00100 #endif
00101 #define hclick_to_physb(n) ((phys_bytes) (n) << HCLICK_SHIFT)
00102 #define physb_to_hclick(n) ((n) >> HCLICK_SHIFT)
00103
00104 #define ABS -999
00105
00106
00107 #define I_TYPE 0170000
00108 #define I_SYMBOLIC_LINK 0120000
00109 #define I_REGULAR 0100000
00110 #define I_BLOCK_SPECIAL 0060000
00111 #define I_DIRECTORY 0040000
00112 #define I_CHAR_SPECIAL 0020000
00113 #define I_NAMED_PIPE 0010000
00114 #define I_SET_UID_BIT 0004000
00115 #define I_SET_GID_BIT 0002000
00116 #define I_SET_STCKY_BIT 0001000
00117 #define ALL_MODES 0007777
00118 #define RWX_MODES 0000777
00119 #define R_BIT 0000004
00120 #define W_BIT 0000002
00121 #define X_BIT 0000001
00122 #define I_NOT_ALLOC 0000000
00123
00124
00125 #define MAX_INODE_NR ((ino_t) 037777777777)
00126 #define MAX_FILE_POS ((off_t) 0x7FFFFFFF)
00127
00128 #define MAX_SYM_LOOPS 8
00129
00130 #define NO_BLOCK ((block_t) 0)
00131 #define NO_ENTRY ((ino_t) 0)
00132 #define NO_ZONE ((zone_t) 0)
00133 #define NO_DEV ((dev_t) 0)
00134
00135 #define SERVARNAME "cttyline"
00136
00137
00138 #define PROC_FULLVM 0x100
00139
00140
00141 #define PREEMPTIBLE 0x02
00142 #define BILLABLE 0x04
00143 #define DYN_PRIV_ID 0x08
00144
00145 #define SYS_PROC 0x10
00146 #define CHECK_IO_PORT 0x20
00147 #define CHECK_IRQ 0x40
00148 #define CHECK_MEM 0x80