PageRenderTime 45ms CodeModel.GetById 11ms app.highlight 30ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/plat-irix6/FILE.py

http://unladen-swallow.googlecode.com/
Python | 677 lines | 591 code | 66 blank | 20 comment | 0 complexity | 4e15c107c6979e07753f1406db33a62a MD5 | raw file
  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 standards.h
  7
  8# Included from sys/types.h
  9
 10# Included from sgidefs.h
 11_MIPS_ISA_MIPS1 = 1
 12_MIPS_ISA_MIPS2 = 2
 13_MIPS_ISA_MIPS3 = 3
 14_MIPS_ISA_MIPS4 = 4
 15_MIPS_SIM_ABI32 = 1
 16_MIPS_SIM_NABI32 = 2
 17_MIPS_SIM_ABI64 = 3
 18
 19# Included from sys/pthread.h
 20P_MYID = (-1)
 21P_MYHOSTID = (-1)
 22
 23# Included from sys/bsd_types.h
 24
 25# Included from sys/mkdev.h
 26ONBITSMAJOR = 7
 27ONBITSMINOR = 8
 28OMAXMAJ = 0x7f
 29OMAXMIN = 0xff
 30NBITSMAJOR = 14
 31NBITSMINOR = 18
 32MAXMAJ = 0x1ff
 33MAXMIN = 0x3ffff
 34OLDDEV = 0
 35NEWDEV = 1
 36MKDEV_VER = NEWDEV
 37def IS_STRING_SPEC_DEV(x): return ((dev_t)(x)==__makedev(MKDEV_VER, 0, 0))
 38
 39def major(dev): return __major(MKDEV_VER, dev)
 40
 41def minor(dev): return __minor(MKDEV_VER, dev)
 42
 43
 44# Included from sys/select.h
 45FD_SETSIZE = 1024
 46__NBBY = 8
 47
 48# Included from string.h
 49NULL = 0L
 50NBBY = 8
 51
 52# Included from sys/cpumask.h
 53MAXCPU = 128
 54def CPUMASK_INDEX(bit): return ((bit) >> 6)
 55
 56def CPUMASK_SHFT(bit): return ((bit) & 0x3f)
 57
 58def CPUMASK_IS_ZERO(p): return ((p) == 0)
 59
 60def CPUMASK_IS_NONZERO(p): return ((p) != 0)
 61
 62
 63# Included from sys/nodemask.h
 64def CNODEMASK_IS_ZERO(p): return ((p) == 0)
 65
 66def CNODEMASK_IS_NONZERO(p): return ((p) != 0)
 67
 68
 69# Included from sys/sema.h
 70
 71# Included from sys/timespec.h
 72
 73# Included from sys/param.h
 74
 75# Included from sys/signal.h
 76SIGHUP = 1
 77SIGINT = 2
 78SIGQUIT = 3
 79SIGILL = 4
 80SIGTRAP = 5
 81SIGIOT = 6
 82SIGABRT = 6
 83SIGEMT = 7
 84SIGFPE = 8
 85SIGKILL = 9
 86SIGBUS = 10
 87SIGSEGV = 11
 88SIGSYS = 12
 89SIGPIPE = 13
 90SIGALRM = 14
 91SIGTERM = 15
 92SIGUSR1 = 16
 93SIGUSR2 = 17
 94SIGCLD = 18
 95SIGCHLD = 18
 96SIGPWR = 19
 97SIGWINCH = 20
 98SIGURG = 21
 99SIGPOLL = 22
100SIGIO = 22
101SIGSTOP = 23
102SIGTSTP = 24
103SIGCONT = 25
104SIGTTIN = 26
105SIGTTOU = 27
106SIGVTALRM = 28
107SIGPROF = 29
108SIGXCPU = 30
109SIGXFSZ = 31
110SIGK32 = 32
111SIGCKPT = 33
112SIGRESTART = 34
113SIGUME = 35
114SIGPTINTR = 47
115SIGPTRESCHED = 48
116SIGRTMIN = 49
117SIGRTMAX = 64
118__sigargs = int
119
120# Included from sys/sigevent.h
121SIGEV_NONE = 128
122SIGEV_SIGNAL = 129
123SIGEV_CALLBACK = 130
124SIGEV_THREAD = 131
125
126# Included from sys/siginfo.h
127SI_MAXSZ = 128
128SI_USER = 0
129SI_KILL = SI_USER
130SI_QUEUE = -1
131SI_ASYNCIO = -2
132SI_TIMER = -3
133SI_MESGQ = -4
134ILL_ILLOPC = 1
135ILL_ILLOPN = 2
136ILL_ILLADR = 3
137ILL_ILLTRP = 4
138ILL_PRVOPC = 5
139ILL_PRVREG = 6
140ILL_COPROC = 7
141ILL_BADSTK = 8
142NSIGILL = 8
143FPE_INTDIV = 1
144FPE_INTOVF = 2
145FPE_FLTDIV = 3
146FPE_FLTOVF = 4
147FPE_FLTUND = 5
148FPE_FLTRES = 6
149FPE_FLTINV = 7
150FPE_FLTSUB = 8
151NSIGFPE = 8
152SEGV_MAPERR = 1
153SEGV_ACCERR = 2
154NSIGSEGV = 2
155BUS_ADRALN = 1
156BUS_ADRERR = 2
157BUS_OBJERR = 3
158NSIGBUS = 3
159TRAP_BRKPT = 1
160TRAP_TRACE = 2
161NSIGTRAP = 2
162CLD_EXITED = 1
163CLD_KILLED = 2
164CLD_DUMPED = 3
165CLD_TRAPPED = 4
166CLD_STOPPED = 5
167CLD_CONTINUED = 6
168NSIGCLD = 6
169POLL_IN = 1
170POLL_OUT = 2
171POLL_MSG = 3
172POLL_ERR = 4
173POLL_PRI = 5
174POLL_HUP = 6
175NSIGPOLL = 6
176UME_ECCERR = 1
177NSIGUME = 1
178SIG_NOP = 0
179SIG_BLOCK = 1
180SIG_UNBLOCK = 2
181SIG_SETMASK = 3
182SIG_SETMASK32 = 256
183SA_ONSTACK = 0x00000001
184SA_RESETHAND = 0x00000002
185SA_RESTART = 0x00000004
186SA_SIGINFO = 0x00000008
187SA_NODEFER = 0x00000010
188SA_NOCLDWAIT = 0x00010000
189SA_NOCLDSTOP = 0x00020000
190_SA_BSDCALL = 0x10000000
191MINSIGSTKSZ = 512
192SIGSTKSZ = 8192
193SS_ONSTACK = 0x00000001
194SS_DISABLE = 0x00000002
195
196# Included from sys/ucontext.h
197NGREG = 36
198NGREG = 37
199GETCONTEXT = 0
200SETCONTEXT = 1
201UC_SIGMASK = 001
202UC_STACK = 002
203UC_CPU = 004
204UC_MAU = 010
205UC_MCONTEXT = (UC_CPU|UC_MAU)
206UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT)
207CTX_R0 = 0
208CTX_AT = 1
209CTX_V0 = 2
210CTX_V1 = 3
211CTX_A0 = 4
212CTX_A1 = 5
213CTX_A2 = 6
214CTX_A3 = 7
215CTX_T0 = 8
216CTX_T1 = 9
217CTX_T2 = 10
218CTX_T3 = 11
219CTX_T4 = 12
220CTX_T5 = 13
221CTX_T6 = 14
222CTX_T7 = 15
223CTX_A4 = 8
224CTX_A5 = 9
225CTX_A6 = 10
226CTX_A7 = 11
227CTX_T0 = 12
228CTX_T1 = 13
229CTX_T2 = 14
230CTX_T3 = 15
231CTX_S0 = 16
232CTX_S1 = 17
233CTX_S2 = 18
234CTX_S3 = 19
235CTX_S4 = 20
236CTX_S5 = 21
237CTX_S6 = 22
238CTX_S7 = 23
239CTX_T8 = 24
240CTX_T9 = 25
241CTX_K0 = 26
242CTX_K1 = 27
243CTX_GP = 28
244CTX_SP = 29
245CTX_S8 = 30
246CTX_RA = 31
247CTX_MDLO = 32
248CTX_MDHI = 33
249CTX_CAUSE = 34
250CTX_EPC = 35
251CTX_SR = 36
252CXT_R0 = CTX_R0
253CXT_AT = CTX_AT
254CXT_V0 = CTX_V0
255CXT_V1 = CTX_V1
256CXT_A0 = CTX_A0
257CXT_A1 = CTX_A1
258CXT_A2 = CTX_A2
259CXT_A3 = CTX_A3
260CXT_T0 = CTX_T0
261CXT_T1 = CTX_T1
262CXT_T2 = CTX_T2
263CXT_T3 = CTX_T3
264CXT_T4 = CTX_T4
265CXT_T5 = CTX_T5
266CXT_T6 = CTX_T6
267CXT_T7 = CTX_T7
268CXT_S0 = CTX_S0
269CXT_S1 = CTX_S1
270CXT_S2 = CTX_S2
271CXT_S3 = CTX_S3
272CXT_S4 = CTX_S4
273CXT_S5 = CTX_S5
274CXT_S6 = CTX_S6
275CXT_S7 = CTX_S7
276CXT_T8 = CTX_T8
277CXT_T9 = CTX_T9
278CXT_K0 = CTX_K0
279CXT_K1 = CTX_K1
280CXT_GP = CTX_GP
281CXT_SP = CTX_SP
282CXT_S8 = CTX_S8
283CXT_RA = CTX_RA
284CXT_MDLO = CTX_MDLO
285CXT_MDHI = CTX_MDHI
286CXT_CAUSE = CTX_CAUSE
287CXT_EPC = CTX_EPC
288CXT_SR = CTX_SR
289CTX_FV0 = 0
290CTX_FV1 = 2
291CTX_FA0 = 12
292CTX_FA1 = 13
293CTX_FA2 = 14
294CTX_FA3 = 15
295CTX_FA4 = 16
296CTX_FA5 = 17
297CTX_FA6 = 18
298CTX_FA7 = 19
299CTX_FT0 = 4
300CTX_FT1 = 5
301CTX_FT2 = 6
302CTX_FT3 = 7
303CTX_FT4 = 8
304CTX_FT5 = 9
305CTX_FT6 = 10
306CTX_FT7 = 11
307CTX_FT8 = 20
308CTX_FT9 = 21
309CTX_FT10 = 22
310CTX_FT11 = 23
311CTX_FT12 = 1
312CTX_FT13 = 3
313CTX_FS0 = 24
314CTX_FS1 = 25
315CTX_FS2 = 26
316CTX_FS3 = 27
317CTX_FS4 = 28
318CTX_FS5 = 29
319CTX_FS6 = 30
320CTX_FS7 = 31
321CTX_FT8 = 21
322CTX_FT9 = 23
323CTX_FT10 = 25
324CTX_FT11 = 27
325CTX_FT12 = 29
326CTX_FT13 = 31
327CTX_FT14 = 1
328CTX_FT15 = 3
329CTX_FS0 = 20
330CTX_FS1 = 22
331CTX_FS2 = 24
332CTX_FS3 = 26
333CTX_FS4 = 28
334CTX_FS5 = 30
335SV_ONSTACK = 0x0001
336SV_INTERRUPT = 0x0002
337NUMBSDSIGS = (32)
338def sigmask(sig): return (1L << ((sig)-1))
339
340def sigmask(sig): return (1L << ((sig)-1))
341
342SIG_ERR = (-1)
343SIG_IGN = (1)
344SIG_HOLD = (2)
345SIG_DFL = (0)
346NSIG = 65
347MAXSIG = (NSIG-1)
348NUMSIGS = (NSIG-1)
349BRK_USERBP = 0
350BRK_KERNELBP = 1
351BRK_ABORT = 2
352BRK_BD_TAKEN = 3
353BRK_BD_NOTTAKEN = 4
354BRK_SSTEPBP = 5
355BRK_OVERFLOW = 6
356BRK_DIVZERO = 7
357BRK_RANGE = 8
358BRK_PSEUDO_OP_BIT = 0x80
359BRK_PSEUDO_OP_MAX = 0x3
360BRK_CACHE_SYNC = 0x80
361BRK_MULOVF = 1023
362_POSIX_VERSION = 199506L
363_POSIX_VERSION = 199506
364_POSIX_VDISABLE = 0
365MAX_INPUT = 512
366MAX_CANON = 256
367UID_NOBODY = 60001
368GID_NOBODY = UID_NOBODY
369UID_NOACCESS = 60002
370MAXPID = 0x7ffffff0
371MAXUID = 0x7fffffff
372MAXLINK = 30000
373SSIZE = 1
374SINCR = 1
375KSTKSIZE = 1
376EXTKSTKSIZE = 1
377KSTKIDX = 0
378KSTEIDX = 1
379EXTKSTKSIZE = 0
380KSTKIDX = 0
381CANBSIZ = 256
382HZ = 100
383TICK = 10000000
384NOFILE = 20
385NGROUPS_UMIN = 0
386NGROUPS_UMAX = 32
387NGROUPS = 16
388PMASK = 0177
389PCATCH = 0400
390PLTWAIT = 01000
391PRECALC = 01000
392PSWP = 0
393PINOD = 10
394PSNDD = PINOD
395PRIBIO = 20
396PZERO = 25
397PMEM = 0
398NZERO = 20
399PPIPE = 26
400PVFS = 27
401PWAIT = 30
402PSLEP = 39
403PUSER = 60
404PBATCH_CRITICAL = -1
405PTIME_SHARE = -2
406PTIME_SHARE_OVER = -3
407PBATCH = -4
408PWEIGHTLESS = -5
409IO_NBPC = 4096
410IO_BPCSHIFT = 12
411MIN_NBPC = 4096
412MIN_BPCSHIFT = 12
413MIN_CPSSHIFT = 10
414BPCSHIFT = 12
415CPSSHIFT = 10
416BPCSHIFT = 14
417CPSSHIFT = 12
418CPSSHIFT = 11
419BPSSHIFT = (BPCSHIFT+CPSSHIFT)
420NULL = 0L
421CMASK = 022
422NODEV = (-1)
423NOPAGE = (-1)
424NBPSCTR = 512
425SCTRSHFT = 9
426def BASEPRI(psw): return (((psw) & SR_IMASK) == SR_IMASK0)
427
428def BASEPRI(psw): return (((psw) & SR_IMASK) == SR_IMASK)
429
430def USERMODE(psw): return (((psw) & SR_KSU_MSK) == SR_KSU_USR)
431
432MAXPATHLEN = 1024
433MAXSYMLINKS = 30
434MAXNAMELEN = 256
435PIPE_BUF = 10240
436PIPE_MAX = 10240
437NBBY = 8
438BBSHIFT = 9
439BBSIZE = (1<<BBSHIFT)
440BBMASK = (BBSIZE-1)
441def BBTOB(bbs): return ((bbs) << BBSHIFT)
442
443def OFFTOBB(bytes): return (((__uint64_t)(bytes) + BBSIZE - 1) >> BBSHIFT)
444
445def OFFTOBBT(bytes): return ((off_t)(bytes) >> BBSHIFT)
446
447def BBTOOFF(bbs): return ((off_t)(bbs) << BBSHIFT)
448
449SEEKLIMIT32 = 0x7fffffff
450MAXBSIZE = 8192
451DEV_BSIZE = BBSIZE
452DEV_BSHIFT = BBSHIFT
453def btodb(bytes): return   \
454
455def dbtob(db): return   \
456
457BLKDEV_IOSHIFT = BPCSHIFT
458BLKDEV_IOSIZE = (1<<BLKDEV_IOSHIFT)
459def BLKDEV_OFF(off): return ((off) & (BLKDEV_IOSIZE - 1))
460
461def BLKDEV_LBN(off): return ((off) >> BLKDEV_IOSHIFT)
462
463def BLKDEV_LTOP(bn): return ((bn) * BLKDEV_BB)
464
465MAXHOSTNAMELEN = 256
466def DELAY(n): return us_delay(n)
467
468def DELAYBUS(n): return us_delaybus(n)
469
470TIMEPOKE_NOW = -100L
471MUTEX_DEFAULT = 0x0
472METER_NAMSZ = 16
473METER_NO_SEQ = -1
474def mutex_spinlock(l): return splhi()
475
476def mutex_spintrylock(l): return splhi()
477
478def spinlock_initialized(l): return 1
479
480SV_FIFO = 0x0
481SV_LIFO = 0x2
482SV_PRIO = 0x4
483SV_KEYED = 0x6
484SV_DEFAULT = SV_FIFO
485SEMA_NOHIST = 0x0001
486SEMA_LOCK = 0x0004
487NSCHEDCLASS = (-(PWEIGHTLESS)+1)
488MR_ACCESS = 1
489MR_UPDATE = 2
490MRLOCK_BARRIER = 0x1
491MRLOCK_BEHAVIOR = 0x2
492MRLOCK_DBLTRIPPABLE = 0x4
493MRLOCK_ALLOW_EQUAL_PRI = 0x8
494MRLOCK_DEFAULT = MRLOCK_BARRIER
495def mraccess(mrp): return mraccessf(mrp, 0)
496
497def mrupdate(mrp): return mrupdatef(mrp, 0)
498
499def mp_mutex_unlock(m): return mutex_unlock(m)
500
501def mp_mutex_trylock(m): return mutex_trylock(m)
502
503def mp_mutex_spinlock(m): return mutex_spinlock(m)
504
505
506# Included from sys/mon.h
507MON_LOCKED = 0x01
508MON_WAITING = 0x02
509MON_TIMEOUT = 0x04
510MON_DOSRV = 0x08
511MON_RUN = 0x10
512MR_READER_BUCKETS = 13
513def initlock(l): return spinlock_init(l,0)
514
515def ownlock(x): return 1
516
517def mutex_enter(m): return mutex_lock(m, PZERO)
518
519def mutex_tryenter(m): return mutex_trylock(m)
520
521def mutex_exit(m): return mutex_unlock(m)
522
523def cv_signal(cv): return sv_signal(cv)
524
525def cv_broadcast(cv): return sv_broadcast(cv)
526
527def cv_destroy(cv): return sv_destroy(cv)
528
529RW_READER = MR_ACCESS
530RW_WRITER = MR_UPDATE
531def rw_exit(r): return mrunlock(r)
532
533def rw_tryupgrade(r): return mrtrypromote(r)
534
535def rw_downgrade(r): return mrdemote(r)
536
537def rw_destroy(r): return mrfree(r)
538
539def RW_WRITE_HELD(r): return ismrlocked(r, MR_UPDATE)
540
541def RW_READ_HELD(r): return ismrlocked(r, MR_ACCESS)
542
543MS_FREE = 0
544MS_UPD = 1
545MS_ACC = 2
546MS_WAITERS = 4
547
548# Included from sys/fcntl.h
549FNDELAY = 0x04
550FAPPEND = 0x08
551FSYNC = 0x10
552FDSYNC = 0x20
553FRSYNC = 0x40
554FNONBLOCK = 0x80
555FASYNC = 0x1000
556FLARGEFILE = 0x2000
557FNONBLK = FNONBLOCK
558FDIRECT = 0x8000
559FBULK = 0x10000
560FDIRENT64 = 0x8000
561FCREAT = 0x0100
562FTRUNC = 0x0200
563FEXCL = 0x0400
564FNOCTTY = 0x0800
565O_RDONLY = 0
566O_WRONLY = 1
567O_RDWR = 2
568O_NDELAY = 0x04
569O_APPEND = 0x08
570O_SYNC = 0x10
571O_DSYNC = 0x20
572O_RSYNC = 0x40
573O_NONBLOCK = 0x80
574O_LARGEFILE = 0x2000
575O_DIRECT = 0x8000
576O_BULK = 0x10000
577O_CREAT = 0x100
578O_TRUNC = 0x200
579O_EXCL = 0x400
580O_NOCTTY = 0x800
581F_DUPFD = 0
582F_GETFD = 1
583F_SETFD = 2
584F_GETFL = 3
585F_SETFL = 4
586F_SETLK = 6
587F_SETLKW = 7
588F_CHKFL = 8
589F_ALLOCSP = 10
590F_FREESP = 11
591F_SETBSDLK = 12
592F_SETBSDLKW = 13
593F_GETLK = 14
594F_CHKLK = 15
595F_CHKLKW = 16
596F_CLNLK = 17
597F_RSETLK = 20
598F_RGETLK = 21
599F_RSETLKW = 22
600F_GETOWN = 23
601F_SETOWN = 24
602F_DIOINFO = 30
603F_FSGETXATTR = 31
604F_FSSETXATTR = 32
605F_GETLK64 = 33
606F_SETLK64 = 34
607F_SETLKW64 = 35
608F_ALLOCSP64 = 36
609F_FREESP64 = 37
610F_GETBMAP = 38
611F_FSSETDM = 39
612F_RESVSP = 40
613F_UNRESVSP = 41
614F_RESVSP64 = 42
615F_UNRESVSP64 = 43
616F_GETBMAPA = 44
617F_FSGETXATTRA = 45
618F_SETBIOSIZE = 46
619F_GETBIOSIZE = 47
620F_GETOPS = 50
621F_DMAPI = 51
622F_FSYNC = 52
623F_FSYNC64 = 53
624F_GETBDSATTR = 54
625F_SETBDSATTR = 55
626F_GETBMAPX = 56
627F_SETPRIO = 57
628F_GETPRIO = 58
629F_RDLCK = 01
630F_WRLCK = 02
631F_UNLCK = 03
632O_ACCMODE = 3
633FD_CLOEXEC = 1
634FD_NODUP_FORK = 4
635BMV_IF_ATTRFORK = 0x1
636BMV_IF_NO_DMAPI_READ = 0x2
637BMV_IF_PREALLOC = 0x4
638BMV_IF_VALID = (BMV_IF_ATTRFORK|BMV_IF_NO_DMAPI_READ|BMV_IF_PREALLOC)
639BMV_OF_PREALLOC = 0x1
640BMV_IF_EXTENDED = 0x40000000
641FMASK = 0x190FF
642FOPEN = 0xFFFFFFFF
643FREAD = 0x01
644FWRITE = 0x02
645FNDELAY = 0x04
646FAPPEND = 0x08
647FSYNC = 0x10
648FDSYNC = 0x20
649FRSYNC = 0x40
650FNONBLOCK = 0x80
651FASYNC = 0x1000
652FNONBLK = FNONBLOCK
653FLARGEFILE = 0x2000
654FDIRECT = 0x8000
655FBULK = 0x10000
656FCREAT = 0x0100
657FTRUNC = 0x0200
658FEXCL = 0x0400
659FNOCTTY = 0x0800
660FINVIS = 0x0100
661FSOCKET = 0x0200
662FINPROGRESS = 0x0400
663FPRIORITY = 0x0800
664FPRIO = 0x4000
665FDIRENT64 = 0x8000
666FCLOSEXEC = 0x01
667LOCK_SH = 1
668LOCK_EX = 2
669LOCK_NB = 4
670LOCK_UN = 8
671L_SET = 0
672L_INCR = 1
673L_XTND = 2
674F_OK = 0
675X_OK = 1
676W_OK = 2
677R_OK = 4