| Guido van Rossum | 8c1529d | 1996-06-11 15:03:14 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/sys/file.h | 
 | 2 |  | 
 | 3 | # Included from sys/types.h | 
 | 4 |  | 
 | 5 | # Included from sgidefs.h | 
 | 6 | _MIPS_ISA_MIPS1 = 1 | 
 | 7 | _MIPS_ISA_MIPS2 = 2 | 
 | 8 | _MIPS_ISA_MIPS3 = 3 | 
 | 9 | _MIPS_ISA_MIPS4 = 4 | 
 | 10 | _MIPS_SIM_ABI32 = 1 | 
 | 11 | _MIPS_SIM_NABI32 = 2 | 
 | 12 | _MIPS_SIM_ABI64 = 3 | 
 | 13 | P_MYID = (-1) | 
 | 14 | P_MYHOSTID = (-1) | 
 | 15 |  | 
 | 16 | # Included from sys/bsd_types.h | 
 | 17 |  | 
 | 18 | # Included from sys/mkdev.h | 
 | 19 | ONBITSMAJOR = 7 | 
 | 20 | ONBITSMINOR = 8 | 
 | 21 | OMAXMAJ = 0x7f | 
 | 22 | OMAXMIN = 0xff | 
 | 23 | NBITSMAJOR = 14 | 
 | 24 | NBITSMINOR = 18 | 
 | 25 | MAXMAJ = 0x1ff | 
 | 26 | MAXMIN = 0x3ffff | 
 | 27 | OLDDEV = 0 | 
 | 28 | NEWDEV = 1 | 
 | 29 | MKDEV_VER = NEWDEV | 
 | 30 | def major(dev): return __major(MKDEV_VER, dev) | 
 | 31 |  | 
 | 32 | def minor(dev): return __minor(MKDEV_VER, dev) | 
 | 33 |  | 
 | 34 |  | 
 | 35 | # Included from sys/select.h | 
 | 36 | FD_SETSIZE = 1024 | 
 | 37 | NBBY = 8 | 
 | 38 |  | 
 | 39 | # Included from sys/sema.h | 
 | 40 | HP_NOPOLICY = 0 | 
 | 41 | HP_ADDOFF = 1 | 
 | 42 | HP_MULOFF = 2 | 
 | 43 | SEMA_NAMSZ = 8 | 
 | 44 | SEMA_NOHIST = 0x1 | 
 | 45 | SEMA_LIFO = 0x2 | 
 | 46 | SEMA_MUTEX = 0x4 | 
 | 47 | SEMA_METER = 0x8 | 
 | 48 | SEMAOP_PSEMA = 1 | 
 | 49 | SEMAOP_VSEMA = 2 | 
 | 50 | SEMAOP_CPSEMA = 3 | 
 | 51 | SEMAOP_CVSEMA = 4 | 
 | 52 | SEMAOP_WSEMA = 5 | 
 | 53 | SEMAOP_UNSEMA = 6 | 
 | 54 | SEMAOP_INIT = 7 | 
 | 55 | SEMAOP_FREE = 8 | 
 | 56 | SSOP_PHIT = 1 | 
 | 57 | SSOP_PSLP = 2 | 
 | 58 | SSOP_PWAKE = 6 | 
 | 59 | SSOP_PRESIG = 7 | 
 | 60 | SSOP_POSTSIG = 8 | 
 | 61 | SSOP_VNOWAKE = 3 | 
 | 62 | SSOP_VWAKE = 4 | 
 | 63 | SSOP_CPHIT = 1 | 
 | 64 | SSOP_CPMISS = 5 | 
 | 65 | SSOP_CVNOWAKE = 3 | 
 | 66 | SSOP_CVWAKE = 4 | 
 | 67 | SSOP_WMISS = 5 | 
 | 68 | SSOP_WWAKE = 4 | 
 | 69 | SSOP_RMV = 9 | 
 | 70 | TZERO = 10 | 
 | 71 | SEMA_NOP = 0 | 
 | 72 | SEMA_WAKE = 1 | 
 | 73 | SEMA_VSEMA = 2 | 
 | 74 | SEMA_SPINOP = 3 | 
 | 75 | MR_ACCESS = 0x1 | 
 | 76 | MR_UPDATE = 0x2 | 
 | 77 | def cv_signal(cv): return cvsema(cv); | 
 | 78 |  | 
 | 79 | def cv_destroy(cv): return freesema(cv) | 
 | 80 |  | 
 | 81 | def mutex_enter(m): return psema(m, PZERO | PNOSTOP) | 
 | 82 |  | 
 | 83 | def mutex_exit(m): return vsema(m) | 
 | 84 |  | 
 | 85 | def mutex_destroy(m): return freesema(m) | 
 | 86 |  | 
 | 87 | def MUTEX_HELD(m): return (ownsema(m)) | 
 | 88 |  | 
 | 89 | def MUTEX_HELD(m): return (1) | 
 | 90 |  | 
 | 91 | RW_READER = MR_ACCESS | 
 | 92 | RW_WRITER = MR_UPDATE | 
 | 93 | def rw_exit(r): return mrunlock(r) | 
 | 94 |  | 
 | 95 | def rw_tryupgrade(r): return cmrpromote(r) | 
 | 96 |  | 
 | 97 | def rw_downgrade(r): return mrdemote(r) | 
 | 98 |  | 
 | 99 | def rw_destroy(r): return mrfree(r) | 
 | 100 |  | 
 | 101 | def RW_WRITE_HELD(r): return ismrlocked(r, MR_UPDATE) | 
 | 102 |  | 
 | 103 | def RW_READ_HELD(r): return ismrlocked(r, MR_ACCESS) | 
 | 104 |  | 
 | 105 |  | 
 | 106 | # Included from sys/splock.h | 
 | 107 | SPLOCKNAMSIZ = 8 | 
 | 108 | SPLOCK_NONE = 0 | 
 | 109 | SPLOCK_SOFT = 1 | 
 | 110 | SPLOCK_HARD = 2 | 
 | 111 | OWNER_NONE = -1 | 
 | 112 | MAP_LOCKID = 0 | 
 | 113 | SPLOCK_MAX = (96*1024) | 
 | 114 | SPLOCK_MAX = 32768 | 
 | 115 | MIN_POOL_SIZE = 256 | 
 | 116 | MAX_POOL_SIZE = 16384 | 
 | 117 | DEF_SEMA_POOL = 8192 | 
 | 118 | DEF_VNODE_POOL = 1024 | 
 | 119 | DEF_FILE_POOL = 1024 | 
 | 120 | def ownlock(x): return 1 | 
 | 121 |  | 
 | 122 | def splock(x): return 1 | 
 | 123 |  | 
 | 124 | def io_splock(x): return 1 | 
 | 125 |  | 
 | 126 | def apvsema(x): return vsema(x) | 
 | 127 |  | 
 | 128 | def apcpsema(x): return cpsema(x) | 
 | 129 |  | 
 | 130 | def apcvsema(x): return cvsema(x) | 
 | 131 |  | 
 | 132 | def mp_mrunlock(a): return mrunlock(a) | 
 | 133 |  | 
 | 134 | def apvsema(x): return 0 | 
 | 135 |  | 
 | 136 | def apcpsema(x): return 1 | 
 | 137 |  | 
 | 138 | def apcvsema(x): return 0 | 
 | 139 |  | 
 | 140 | def mp_mrunlock(a): return 0 | 
 | 141 |  | 
 | 142 |  | 
 | 143 | # Included from sys/fcntl.h | 
 | 144 | FNDELAY = 0x04 | 
 | 145 | FAPPEND = 0x08 | 
 | 146 | FSYNC = 0x10 | 
 | 147 | FNONBLOCK = 0x80 | 
 | 148 | FASYNC = 0x1000 | 
 | 149 | FNONBLK = FNONBLOCK | 
 | 150 | FDIRECT = 0x8000 | 
 | 151 | FCREAT = 0x0100 | 
 | 152 | FTRUNC = 0x0200 | 
 | 153 | FEXCL = 0x0400 | 
 | 154 | FNOCTTY = 0x0800 | 
 | 155 | O_RDONLY = 0 | 
 | 156 | O_WRONLY = 1 | 
 | 157 | O_RDWR = 2 | 
 | 158 | O_NDELAY = 0x04 | 
 | 159 | O_APPEND = 0x08 | 
 | 160 | O_SYNC = 0x10 | 
 | 161 | O_NONBLOCK = 0x80 | 
 | 162 | O_DIRECT = 0x8000 | 
 | 163 | O_CREAT = 0x100 | 
 | 164 | O_TRUNC = 0x200 | 
 | 165 | O_EXCL = 0x400 | 
 | 166 | O_NOCTTY = 0x800 | 
 | 167 | F_DUPFD = 0 | 
 | 168 | F_GETFD = 1 | 
 | 169 | F_SETFD = 2 | 
 | 170 | F_GETFL = 3 | 
 | 171 | F_SETFL = 4 | 
 | 172 | F_GETLK = 14 | 
 | 173 | F_SETLK = 6 | 
 | 174 | F_SETLKW = 7 | 
 | 175 | F_CHKFL = 8 | 
 | 176 | F_ALLOCSP = 10 | 
 | 177 | F_FREESP = 11 | 
 | 178 | F_SETBSDLK = 12 | 
 | 179 | F_SETBSDLKW = 13 | 
 | 180 | F_DIOINFO = 30 | 
 | 181 | F_FSGETXATTR = 31 | 
 | 182 | F_FSSETXATTR = 32 | 
 | 183 | F_GETLK64 = 33 | 
 | 184 | F_SETLK64 = 34 | 
 | 185 | F_SETLKW64 = 35 | 
 | 186 | F_ALLOCSP64 = 36 | 
 | 187 | F_FREESP64 = 37 | 
 | 188 | F_GETBMAP = 38 | 
 | 189 | F_FSSETDM = 39 | 
 | 190 | F_RSETLK = 20 | 
 | 191 | F_RGETLK = 21 | 
 | 192 | F_RSETLKW = 22 | 
 | 193 | F_GETOWN = 23 | 
 | 194 | F_SETOWN = 24 | 
 | 195 | F_O_GETLK = 5 | 
 | 196 | F_O_GETOWN = 10 | 
 | 197 | F_O_SETOWN = 11 | 
 | 198 | F_RDLCK = 01 | 
 | 199 | F_WRLCK = 02 | 
 | 200 | F_UNLCK = 03 | 
 | 201 | O_ACCMODE = 3 | 
 | 202 | FD_CLOEXEC = 1 | 
 | 203 | FD_NODUP_FORK = 4 | 
 | 204 | FMASK = 0x90FF | 
 | 205 | FOPEN = 0xFFFFFFFF | 
 | 206 | FREAD = 0x01 | 
 | 207 | FWRITE = 0x02 | 
 | 208 | FNDELAY = 0x04 | 
 | 209 | FAPPEND = 0x08 | 
 | 210 | FSYNC = 0x10 | 
 | 211 | FNONBLOCK = 0x80 | 
 | 212 | FASYNC = 0x1000 | 
 | 213 | FNONBLK = FNONBLOCK | 
 | 214 | FDIRECT = 0x8000 | 
 | 215 | FCREAT = 0x0100 | 
 | 216 | FTRUNC = 0x0200 | 
 | 217 | FEXCL = 0x0400 | 
 | 218 | FNOCTTY = 0x0800 | 
 | 219 | IRIX4_FASYNC = 0x40 | 
 | 220 | FMARK = 0x4000 | 
 | 221 | FDEFER = 0x2000 | 
 | 222 | FINPROGRESS = 0x0400 | 
 | 223 | FINVIS = 0x0100 | 
 | 224 | FNMFS = 0x2000 | 
 | 225 | FCLOSEXEC = 001 | 
 | 226 | FDSHD = 0x0001 | 
 | 227 | FDNOMARK = 0x0002 | 
 | 228 | FDIGNPROGRESS = 0x0004 | 
 | 229 | LOCK_SH = 1 | 
 | 230 | LOCK_EX = 2 | 
 | 231 | LOCK_NB = 4 | 
 | 232 | LOCK_UN = 8 | 
 | 233 | F_OK = 0 | 
 | 234 | X_OK = 1 | 
 | 235 | W_OK = 2 | 
 | 236 | R_OK = 4 | 
 | 237 | L_SET = 0 | 
 | 238 | L_INCR = 1 | 
 | 239 | L_XTND = 2 |