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