PageRenderTime 127ms CodeModel.GetById 37ms app.highlight 81ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/plat-sunos5/STROPTS.py

http://unladen-swallow.googlecode.com/
Python | 1813 lines | 1569 code | 167 blank | 77 comment | 0 complexity | 25ddb1e6a033bbef67df1448f2567c01 MD5 | raw file
   1# Generated by h2py from /usr/include/sys/stropts.h
   2
   3# Included from sys/feature_tests.h
   4
   5# Included from sys/isa_defs.h
   6_CHAR_ALIGNMENT = 1
   7_SHORT_ALIGNMENT = 2
   8_INT_ALIGNMENT = 4
   9_LONG_ALIGNMENT = 8
  10_LONG_LONG_ALIGNMENT = 8
  11_DOUBLE_ALIGNMENT = 8
  12_LONG_DOUBLE_ALIGNMENT = 16
  13_POINTER_ALIGNMENT = 8
  14_MAX_ALIGNMENT = 16
  15_ALIGNMENT_REQUIRED = 1
  16_CHAR_ALIGNMENT = 1
  17_SHORT_ALIGNMENT = 2
  18_INT_ALIGNMENT = 4
  19_LONG_ALIGNMENT = 4
  20_LONG_LONG_ALIGNMENT = 4
  21_DOUBLE_ALIGNMENT = 4
  22_LONG_DOUBLE_ALIGNMENT = 4
  23_POINTER_ALIGNMENT = 4
  24_MAX_ALIGNMENT = 4
  25_ALIGNMENT_REQUIRED = 0
  26_CHAR_ALIGNMENT = 1
  27_SHORT_ALIGNMENT = 2
  28_INT_ALIGNMENT = 4
  29_LONG_LONG_ALIGNMENT = 8
  30_DOUBLE_ALIGNMENT = 8
  31_ALIGNMENT_REQUIRED = 1
  32_LONG_ALIGNMENT = 4
  33_LONG_DOUBLE_ALIGNMENT = 8
  34_POINTER_ALIGNMENT = 4
  35_MAX_ALIGNMENT = 8
  36_LONG_ALIGNMENT = 8
  37_LONG_DOUBLE_ALIGNMENT = 16
  38_POINTER_ALIGNMENT = 8
  39_MAX_ALIGNMENT = 16
  40_POSIX_C_SOURCE = 1
  41_LARGEFILE64_SOURCE = 1
  42_LARGEFILE_SOURCE = 1
  43_FILE_OFFSET_BITS = 64
  44_FILE_OFFSET_BITS = 32
  45_POSIX_C_SOURCE = 199506L
  46_POSIX_PTHREAD_SEMANTICS = 1
  47_XOPEN_VERSION = 500
  48_XOPEN_VERSION = 4
  49_XOPEN_VERSION = 3
  50from TYPES import *
  51
  52# Included from sys/conf.h
  53
  54# Included from sys/t_lock.h
  55
  56# Included from sys/machlock.h
  57from TYPES import *
  58LOCK_HELD_VALUE = 0xff
  59def SPIN_LOCK(pl): return ((pl) > ipltospl(LOCK_LEVEL))
  60
  61def LOCK_SAMPLE_INTERVAL(i): return (((i) & 0xff) == 0)
  62
  63CLOCK_LEVEL = 10
  64LOCK_LEVEL = 10
  65DISP_LEVEL = (LOCK_LEVEL + 1)
  66PTR24_LSB = 5
  67PTR24_MSB = (PTR24_LSB + 24)
  68PTR24_ALIGN = 32
  69PTR24_BASE = 0xe0000000
  70
  71# Included from sys/param.h
  72from TYPES import *
  73_POSIX_VDISABLE = 0
  74MAX_INPUT = 512
  75MAX_CANON = 256
  76UID_NOBODY = 60001
  77GID_NOBODY = UID_NOBODY
  78UID_NOACCESS = 60002
  79MAX_TASKID = 999999
  80MAX_MAXPID = 999999
  81DEFAULT_MAXPID = 999999
  82DEFAULT_JUMPPID = 100000
  83DEFAULT_MAXPID = 30000
  84DEFAULT_JUMPPID = 0
  85MAXUID = 2147483647
  86MAXPROJID = MAXUID
  87MAXLINK = 32767
  88NMOUNT = 40
  89CANBSIZ = 256
  90NOFILE = 20
  91NGROUPS_UMIN = 0
  92NGROUPS_UMAX = 32
  93NGROUPS_MAX_DEFAULT = 16
  94NZERO = 20
  95NULL = 0L
  96NULL = 0
  97CMASK = 022
  98CDLIMIT = (1L<<11)
  99NBPS = 0x20000
 100NBPSCTR = 512
 101UBSIZE = 512
 102SCTRSHFT = 9
 103SYSNAME = 9
 104PREMOTE = 39
 105MAXPATHLEN = 1024
 106MAXSYMLINKS = 20
 107MAXNAMELEN = 256
 108NADDR = 13
 109PIPE_BUF = 5120
 110PIPE_MAX = 5120
 111NBBY = 8
 112MAXBSIZE = 8192
 113DEV_BSIZE = 512
 114DEV_BSHIFT = 9
 115MAXFRAG = 8
 116MAXOFF32_T = 0x7fffffff
 117MAXOFF_T = 0x7fffffffffffffffl
 118MAXOFFSET_T = 0x7fffffffffffffffl
 119MAXOFF_T = 0x7fffffffl
 120MAXOFFSET_T = 0x7fffffff
 121def btodb(bytes): return   \
 122
 123def dbtob(db): return   \
 124
 125def lbtodb(bytes): return   \
 126
 127def ldbtob(db): return   \
 128
 129NCARGS32 = 0x100000
 130NCARGS64 = 0x200000
 131NCARGS = NCARGS64
 132NCARGS = NCARGS32
 133FSHIFT = 8
 134FSCALE = (1<<FSHIFT)
 135def DELAY(n): return drv_usecwait(n)
 136
 137def mmu_ptob(x): return ((x) << MMU_PAGESHIFT)
 138
 139def mmu_btop(x): return (((x)) >> MMU_PAGESHIFT)
 140
 141def mmu_btopr(x): return ((((x) + MMU_PAGEOFFSET) >> MMU_PAGESHIFT))
 142
 143def mmu_ptod(x): return ((x) << (MMU_PAGESHIFT - DEV_BSHIFT))
 144
 145def ptod(x): return ((x) << (PAGESHIFT - DEV_BSHIFT))
 146
 147def ptob(x): return ((x) << PAGESHIFT)
 148
 149def btop(x): return (((x) >> PAGESHIFT))
 150
 151def btopr(x): return ((((x) + PAGEOFFSET) >> PAGESHIFT))
 152
 153def dtop(DD): return (((DD) + NDPP - 1) >> (PAGESHIFT - DEV_BSHIFT))
 154
 155def dtopt(DD): return ((DD) >> (PAGESHIFT - DEV_BSHIFT))
 156
 157_AIO_LISTIO_MAX = (4096)
 158_AIO_MAX = (-1)
 159_MQ_OPEN_MAX = (32)
 160_MQ_PRIO_MAX = (32)
 161_SEM_NSEMS_MAX = INT_MAX
 162_SEM_VALUE_MAX = INT_MAX
 163
 164# Included from sys/unistd.h
 165_CS_PATH = 65
 166_CS_LFS_CFLAGS = 68
 167_CS_LFS_LDFLAGS = 69
 168_CS_LFS_LIBS = 70
 169_CS_LFS_LINTFLAGS = 71
 170_CS_LFS64_CFLAGS = 72
 171_CS_LFS64_LDFLAGS = 73
 172_CS_LFS64_LIBS = 74
 173_CS_LFS64_LINTFLAGS = 75
 174_CS_XBS5_ILP32_OFF32_CFLAGS = 700
 175_CS_XBS5_ILP32_OFF32_LDFLAGS = 701
 176_CS_XBS5_ILP32_OFF32_LIBS = 702
 177_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703
 178_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705
 179_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706
 180_CS_XBS5_ILP32_OFFBIG_LIBS = 707
 181_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708
 182_CS_XBS5_LP64_OFF64_CFLAGS = 709
 183_CS_XBS5_LP64_OFF64_LDFLAGS = 710
 184_CS_XBS5_LP64_OFF64_LIBS = 711
 185_CS_XBS5_LP64_OFF64_LINTFLAGS = 712
 186_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713
 187_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714
 188_CS_XBS5_LPBIG_OFFBIG_LIBS = 715
 189_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716
 190_SC_ARG_MAX = 1
 191_SC_CHILD_MAX = 2
 192_SC_CLK_TCK = 3
 193_SC_NGROUPS_MAX = 4
 194_SC_OPEN_MAX = 5
 195_SC_JOB_CONTROL = 6
 196_SC_SAVED_IDS = 7
 197_SC_VERSION = 8
 198_SC_PASS_MAX = 9
 199_SC_LOGNAME_MAX = 10
 200_SC_PAGESIZE = 11
 201_SC_XOPEN_VERSION = 12
 202_SC_NPROCESSORS_CONF = 14
 203_SC_NPROCESSORS_ONLN = 15
 204_SC_STREAM_MAX = 16
 205_SC_TZNAME_MAX = 17
 206_SC_AIO_LISTIO_MAX = 18
 207_SC_AIO_MAX = 19
 208_SC_AIO_PRIO_DELTA_MAX = 20
 209_SC_ASYNCHRONOUS_IO = 21
 210_SC_DELAYTIMER_MAX = 22
 211_SC_FSYNC = 23
 212_SC_MAPPED_FILES = 24
 213_SC_MEMLOCK = 25
 214_SC_MEMLOCK_RANGE = 26
 215_SC_MEMORY_PROTECTION = 27
 216_SC_MESSAGE_PASSING = 28
 217_SC_MQ_OPEN_MAX = 29
 218_SC_MQ_PRIO_MAX = 30
 219_SC_PRIORITIZED_IO = 31
 220_SC_PRIORITY_SCHEDULING = 32
 221_SC_REALTIME_SIGNALS = 33
 222_SC_RTSIG_MAX = 34
 223_SC_SEMAPHORES = 35
 224_SC_SEM_NSEMS_MAX = 36
 225_SC_SEM_VALUE_MAX = 37
 226_SC_SHARED_MEMORY_OBJECTS = 38
 227_SC_SIGQUEUE_MAX = 39
 228_SC_SIGRT_MIN = 40
 229_SC_SIGRT_MAX = 41
 230_SC_SYNCHRONIZED_IO = 42
 231_SC_TIMERS = 43
 232_SC_TIMER_MAX = 44
 233_SC_2_C_BIND = 45
 234_SC_2_C_DEV = 46
 235_SC_2_C_VERSION = 47
 236_SC_2_FORT_DEV = 48
 237_SC_2_FORT_RUN = 49
 238_SC_2_LOCALEDEF = 50
 239_SC_2_SW_DEV = 51
 240_SC_2_UPE = 52
 241_SC_2_VERSION = 53
 242_SC_BC_BASE_MAX = 54
 243_SC_BC_DIM_MAX = 55
 244_SC_BC_SCALE_MAX = 56
 245_SC_BC_STRING_MAX = 57
 246_SC_COLL_WEIGHTS_MAX = 58
 247_SC_EXPR_NEST_MAX = 59
 248_SC_LINE_MAX = 60
 249_SC_RE_DUP_MAX = 61
 250_SC_XOPEN_CRYPT = 62
 251_SC_XOPEN_ENH_I18N = 63
 252_SC_XOPEN_SHM = 64
 253_SC_2_CHAR_TERM = 66
 254_SC_XOPEN_XCU_VERSION = 67
 255_SC_ATEXIT_MAX = 76
 256_SC_IOV_MAX = 77
 257_SC_XOPEN_UNIX = 78
 258_SC_PAGE_SIZE = _SC_PAGESIZE
 259_SC_T_IOV_MAX = 79
 260_SC_PHYS_PAGES = 500
 261_SC_AVPHYS_PAGES = 501
 262_SC_COHER_BLKSZ = 503
 263_SC_SPLIT_CACHE = 504
 264_SC_ICACHE_SZ = 505
 265_SC_DCACHE_SZ = 506
 266_SC_ICACHE_LINESZ = 507
 267_SC_DCACHE_LINESZ = 508
 268_SC_ICACHE_BLKSZ = 509
 269_SC_DCACHE_BLKSZ = 510
 270_SC_DCACHE_TBLKSZ = 511
 271_SC_ICACHE_ASSOC = 512
 272_SC_DCACHE_ASSOC = 513
 273_SC_MAXPID = 514
 274_SC_STACK_PROT = 515
 275_SC_THREAD_DESTRUCTOR_ITERATIONS = 568
 276_SC_GETGR_R_SIZE_MAX = 569
 277_SC_GETPW_R_SIZE_MAX = 570
 278_SC_LOGIN_NAME_MAX = 571
 279_SC_THREAD_KEYS_MAX = 572
 280_SC_THREAD_STACK_MIN = 573
 281_SC_THREAD_THREADS_MAX = 574
 282_SC_TTY_NAME_MAX = 575
 283_SC_THREADS = 576
 284_SC_THREAD_ATTR_STACKADDR = 577
 285_SC_THREAD_ATTR_STACKSIZE = 578
 286_SC_THREAD_PRIORITY_SCHEDULING = 579
 287_SC_THREAD_PRIO_INHERIT = 580
 288_SC_THREAD_PRIO_PROTECT = 581
 289_SC_THREAD_PROCESS_SHARED = 582
 290_SC_THREAD_SAFE_FUNCTIONS = 583
 291_SC_XOPEN_LEGACY = 717
 292_SC_XOPEN_REALTIME = 718
 293_SC_XOPEN_REALTIME_THREADS = 719
 294_SC_XBS5_ILP32_OFF32 = 720
 295_SC_XBS5_ILP32_OFFBIG = 721
 296_SC_XBS5_LP64_OFF64 = 722
 297_SC_XBS5_LPBIG_OFFBIG = 723
 298_PC_LINK_MAX = 1
 299_PC_MAX_CANON = 2
 300_PC_MAX_INPUT = 3
 301_PC_NAME_MAX = 4
 302_PC_PATH_MAX = 5
 303_PC_PIPE_BUF = 6
 304_PC_NO_TRUNC = 7
 305_PC_VDISABLE = 8
 306_PC_CHOWN_RESTRICTED = 9
 307_PC_ASYNC_IO = 10
 308_PC_PRIO_IO = 11
 309_PC_SYNC_IO = 12
 310_PC_FILESIZEBITS = 67
 311_PC_LAST = 67
 312_POSIX_VERSION = 199506L
 313_POSIX2_VERSION = 199209L
 314_POSIX2_C_VERSION = 199209L
 315_XOPEN_XCU_VERSION = 4
 316_XOPEN_REALTIME = 1
 317_XOPEN_ENH_I18N = 1
 318_XOPEN_SHM = 1
 319_POSIX2_C_BIND = 1
 320_POSIX2_CHAR_TERM = 1
 321_POSIX2_LOCALEDEF = 1
 322_POSIX2_C_DEV = 1
 323_POSIX2_SW_DEV = 1
 324_POSIX2_UPE = 1
 325
 326# Included from sys/mutex.h
 327from TYPES import *
 328def MUTEX_HELD(x): return (mutex_owned(x))
 329
 330
 331# Included from sys/rwlock.h
 332from TYPES import *
 333def RW_READ_HELD(x): return (rw_read_held((x)))
 334
 335def RW_WRITE_HELD(x): return (rw_write_held((x)))
 336
 337def RW_LOCK_HELD(x): return (rw_lock_held((x)))
 338
 339def RW_ISWRITER(x): return (rw_iswriter(x))
 340
 341
 342# Included from sys/semaphore.h
 343
 344# Included from sys/thread.h
 345from TYPES import *
 346
 347# Included from sys/klwp.h
 348from TYPES import *
 349
 350# Included from sys/condvar.h
 351from TYPES import *
 352
 353# Included from sys/time.h
 354
 355# Included from sys/types32.h
 356
 357# Included from sys/int_types.h
 358TIME32_MAX = INT32_MAX
 359TIME32_MIN = INT32_MIN
 360def TIMEVAL_OVERFLOW(tv): return \
 361
 362from TYPES import *
 363DST_NONE = 0
 364DST_USA = 1
 365DST_AUST = 2
 366DST_WET = 3
 367DST_MET = 4
 368DST_EET = 5
 369DST_CAN = 6
 370DST_GB = 7
 371DST_RUM = 8
 372DST_TUR = 9
 373DST_AUSTALT = 10
 374ITIMER_REAL = 0
 375ITIMER_VIRTUAL = 1
 376ITIMER_PROF = 2
 377ITIMER_REALPROF = 3
 378def ITIMERVAL_OVERFLOW(itv): return \
 379
 380SEC = 1
 381MILLISEC = 1000
 382MICROSEC = 1000000
 383NANOSEC = 1000000000
 384
 385# Included from sys/time_impl.h
 386def TIMESPEC_OVERFLOW(ts): return \
 387
 388def ITIMERSPEC_OVERFLOW(it): return \
 389
 390__CLOCK_REALTIME0 = 0
 391CLOCK_VIRTUAL = 1
 392CLOCK_PROF = 2
 393__CLOCK_REALTIME3 = 3
 394CLOCK_HIGHRES = 4
 395CLOCK_MAX = 5
 396CLOCK_REALTIME = __CLOCK_REALTIME3
 397CLOCK_REALTIME = __CLOCK_REALTIME0
 398TIMER_RELTIME = 0x0
 399TIMER_ABSTIME = 0x1
 400def TICK_TO_SEC(tick): return ((tick) / hz)
 401
 402def SEC_TO_TICK(sec): return ((sec) * hz)
 403
 404def TICK_TO_MSEC(tick): return \
 405
 406def MSEC_TO_TICK(msec): return \
 407
 408def MSEC_TO_TICK_ROUNDUP(msec): return \
 409
 410def TICK_TO_USEC(tick): return ((tick) * usec_per_tick)
 411
 412def USEC_TO_TICK(usec): return ((usec) / usec_per_tick)
 413
 414def USEC_TO_TICK_ROUNDUP(usec): return \
 415
 416def TICK_TO_NSEC(tick): return ((tick) * nsec_per_tick)
 417
 418def NSEC_TO_TICK(nsec): return ((nsec) / nsec_per_tick)
 419
 420def NSEC_TO_TICK_ROUNDUP(nsec): return \
 421
 422def TIMEVAL_TO_TICK(tvp): return \
 423
 424def TIMESTRUC_TO_TICK(tsp): return \
 425
 426
 427# Included from time.h
 428from TYPES import *
 429
 430# Included from iso/time_iso.h
 431NULL = 0L
 432NULL = 0
 433CLOCKS_PER_SEC = 1000000
 434
 435# Included from sys/select.h
 436FD_SETSIZE = 65536
 437FD_SETSIZE = 1024
 438_NBBY = 8
 439NBBY = _NBBY
 440def FD_ZERO(p): return bzero((p), sizeof (*(p)))
 441
 442
 443# Included from sys/signal.h
 444
 445# Included from sys/iso/signal_iso.h
 446SIGHUP = 1
 447SIGINT = 2
 448SIGQUIT = 3
 449SIGILL = 4
 450SIGTRAP = 5
 451SIGIOT = 6
 452SIGABRT = 6
 453SIGEMT = 7
 454SIGFPE = 8
 455SIGKILL = 9
 456SIGBUS = 10
 457SIGSEGV = 11
 458SIGSYS = 12
 459SIGPIPE = 13
 460SIGALRM = 14
 461SIGTERM = 15
 462SIGUSR1 = 16
 463SIGUSR2 = 17
 464SIGCLD = 18
 465SIGCHLD = 18
 466SIGPWR = 19
 467SIGWINCH = 20
 468SIGURG = 21
 469SIGPOLL = 22
 470SIGIO = SIGPOLL
 471SIGSTOP = 23
 472SIGTSTP = 24
 473SIGCONT = 25
 474SIGTTIN = 26
 475SIGTTOU = 27
 476SIGVTALRM = 28
 477SIGPROF = 29
 478SIGXCPU = 30
 479SIGXFSZ = 31
 480SIGWAITING = 32
 481SIGLWP = 33
 482SIGFREEZE = 34
 483SIGTHAW = 35
 484SIGCANCEL = 36
 485SIGLOST = 37
 486_SIGRTMIN = 38
 487_SIGRTMAX = 45
 488SIG_BLOCK = 1
 489SIG_UNBLOCK = 2
 490SIG_SETMASK = 3
 491SIGNO_MASK = 0xFF
 492SIGDEFER = 0x100
 493SIGHOLD = 0x200
 494SIGRELSE = 0x400
 495SIGIGNORE = 0x800
 496SIGPAUSE = 0x1000
 497
 498# Included from sys/siginfo.h
 499from TYPES import *
 500SIGEV_NONE = 1
 501SIGEV_SIGNAL = 2
 502SIGEV_THREAD = 3
 503SI_NOINFO = 32767
 504SI_USER = 0
 505SI_LWP = (-1)
 506SI_QUEUE = (-2)
 507SI_TIMER = (-3)
 508SI_ASYNCIO = (-4)
 509SI_MESGQ = (-5)
 510
 511# Included from sys/machsig.h
 512ILL_ILLOPC = 1
 513ILL_ILLOPN = 2
 514ILL_ILLADR = 3
 515ILL_ILLTRP = 4
 516ILL_PRVOPC = 5
 517ILL_PRVREG = 6
 518ILL_COPROC = 7
 519ILL_BADSTK = 8
 520NSIGILL = 8
 521EMT_TAGOVF = 1
 522EMT_CPCOVF = 2
 523NSIGEMT = 2
 524FPE_INTDIV = 1
 525FPE_INTOVF = 2
 526FPE_FLTDIV = 3
 527FPE_FLTOVF = 4
 528FPE_FLTUND = 5
 529FPE_FLTRES = 6
 530FPE_FLTINV = 7
 531FPE_FLTSUB = 8
 532NSIGFPE = 8
 533SEGV_MAPERR = 1
 534SEGV_ACCERR = 2
 535NSIGSEGV = 2
 536BUS_ADRALN = 1
 537BUS_ADRERR = 2
 538BUS_OBJERR = 3
 539NSIGBUS = 3
 540TRAP_BRKPT = 1
 541TRAP_TRACE = 2
 542TRAP_RWATCH = 3
 543TRAP_WWATCH = 4
 544TRAP_XWATCH = 5
 545NSIGTRAP = 5
 546CLD_EXITED = 1
 547CLD_KILLED = 2
 548CLD_DUMPED = 3
 549CLD_TRAPPED = 4
 550CLD_STOPPED = 5
 551CLD_CONTINUED = 6
 552NSIGCLD = 6
 553POLL_IN = 1
 554POLL_OUT = 2
 555POLL_MSG = 3
 556POLL_ERR = 4
 557POLL_PRI = 5
 558POLL_HUP = 6
 559NSIGPOLL = 6
 560PROF_SIG = 1
 561NSIGPROF = 1
 562SI_MAXSZ = 256
 563SI_MAXSZ = 128
 564
 565# Included from sys/time_std_impl.h
 566from TYPES import *
 567SI32_MAXSZ = 128
 568def SI_CANQUEUE(c): return ((c) <= SI_QUEUE)
 569
 570SA_NOCLDSTOP = 0x00020000
 571SA_ONSTACK = 0x00000001
 572SA_RESETHAND = 0x00000002
 573SA_RESTART = 0x00000004
 574SA_SIGINFO = 0x00000008
 575SA_NODEFER = 0x00000010
 576SA_NOCLDWAIT = 0x00010000
 577SA_WAITSIG = 0x00010000
 578NSIG = 46
 579MAXSIG = 45
 580S_SIGNAL = 1
 581S_SIGSET = 2
 582S_SIGACTION = 3
 583S_NONE = 4
 584MINSIGSTKSZ = 2048
 585SIGSTKSZ = 8192
 586SS_ONSTACK = 0x00000001
 587SS_DISABLE = 0x00000002
 588SN_PROC = 1
 589SN_CANCEL = 2
 590SN_SEND = 3
 591
 592# Included from sys/ucontext.h
 593from TYPES import *
 594
 595# Included from sys/regset.h
 596REG_CCR = (0)
 597REG_PSR = (0)
 598REG_PSR = (0)
 599REG_PC = (1)
 600REG_nPC = (2)
 601REG_Y = (3)
 602REG_G1 = (4)
 603REG_G2 = (5)
 604REG_G3 = (6)
 605REG_G4 = (7)
 606REG_G5 = (8)
 607REG_G6 = (9)
 608REG_G7 = (10)
 609REG_O0 = (11)
 610REG_O1 = (12)
 611REG_O2 = (13)
 612REG_O3 = (14)
 613REG_O4 = (15)
 614REG_O5 = (16)
 615REG_O6 = (17)
 616REG_O7 = (18)
 617REG_ASI = (19)
 618REG_FPRS = (20)
 619REG_PS = REG_PSR
 620REG_SP = REG_O6
 621REG_R0 = REG_O0
 622REG_R1 = REG_O1
 623_NGREG = 21
 624_NGREG = 19
 625NGREG = _NGREG
 626_NGREG32 = 19
 627_NGREG64 = 21
 628SPARC_MAXREGWINDOW = 31
 629MAXFPQ = 16
 630XRS_ID = 0x78727300
 631
 632# Included from v7/sys/privregs.h
 633
 634# Included from v7/sys/psr.h
 635PSR_CWP = 0x0000001F
 636PSR_ET = 0x00000020
 637PSR_PS = 0x00000040
 638PSR_S = 0x00000080
 639PSR_PIL = 0x00000F00
 640PSR_EF = 0x00001000
 641PSR_EC = 0x00002000
 642PSR_RSV = 0x000FC000
 643PSR_ICC = 0x00F00000
 644PSR_C = 0x00100000
 645PSR_V = 0x00200000
 646PSR_Z = 0x00400000
 647PSR_N = 0x00800000
 648PSR_VER = 0x0F000000
 649PSR_IMPL = 0xF0000000
 650PSL_ALLCC = PSR_ICC
 651PSL_USER = (PSR_S)
 652PSL_USERMASK = (PSR_ICC)
 653PSL_UBITS = (PSR_ICC|PSR_EF)
 654def USERMODE(ps): return (((ps) & PSR_PS) == 0)
 655
 656
 657# Included from sys/fsr.h
 658FSR_CEXC = 0x0000001f
 659FSR_AEXC = 0x000003e0
 660FSR_FCC = 0x00000c00
 661FSR_PR = 0x00001000
 662FSR_QNE = 0x00002000
 663FSR_FTT = 0x0001c000
 664FSR_VER = 0x000e0000
 665FSR_TEM = 0x0f800000
 666FSR_RP = 0x30000000
 667FSR_RD = 0xc0000000
 668FSR_VER_SHIFT = 17
 669FSR_FCC1 = 0x00000003
 670FSR_FCC2 = 0x0000000C
 671FSR_FCC3 = 0x00000030
 672FSR_CEXC_NX = 0x00000001
 673FSR_CEXC_DZ = 0x00000002
 674FSR_CEXC_UF = 0x00000004
 675FSR_CEXC_OF = 0x00000008
 676FSR_CEXC_NV = 0x00000010
 677FSR_AEXC_NX = (0x1 << 5)
 678FSR_AEXC_DZ = (0x2 << 5)
 679FSR_AEXC_UF = (0x4 << 5)
 680FSR_AEXC_OF = (0x8 << 5)
 681FSR_AEXC_NV = (0x10 << 5)
 682FTT_NONE = 0
 683FTT_IEEE = 1
 684FTT_UNFIN = 2
 685FTT_UNIMP = 3
 686FTT_SEQ = 4
 687FTT_ALIGN = 5
 688FTT_DFAULT = 6
 689FSR_FTT_SHIFT = 14
 690FSR_FTT_IEEE = (FTT_IEEE   << FSR_FTT_SHIFT)
 691FSR_FTT_UNFIN = (FTT_UNFIN  << FSR_FTT_SHIFT)
 692FSR_FTT_UNIMP = (FTT_UNIMP  << FSR_FTT_SHIFT)
 693FSR_FTT_SEQ = (FTT_SEQ    << FSR_FTT_SHIFT)
 694FSR_FTT_ALIGN = (FTT_ALIGN  << FSR_FTT_SHIFT)
 695FSR_FTT_DFAULT = (FTT_DFAULT << FSR_FTT_SHIFT)
 696FSR_TEM_NX = (0x1 << 23)
 697FSR_TEM_DZ = (0x2 << 23)
 698FSR_TEM_UF = (0x4 << 23)
 699FSR_TEM_OF = (0x8 << 23)
 700FSR_TEM_NV = (0x10 << 23)
 701RP_DBLEXT = 0
 702RP_SINGLE = 1
 703RP_DOUBLE = 2
 704RP_RESERVED = 3
 705RD_NEAR = 0
 706RD_ZER0 = 1
 707RD_POSINF = 2
 708RD_NEGINF = 3
 709FPRS_DL = 0x1
 710FPRS_DU = 0x2
 711FPRS_FEF = 0x4
 712PIL_MAX = 0xf
 713def SAVE_GLOBALS(RP): return \
 714
 715def RESTORE_GLOBALS(RP): return \
 716
 717def SAVE_OUTS(RP): return \
 718
 719def RESTORE_OUTS(RP): return \
 720
 721def SAVE_WINDOW(SBP): return \
 722
 723def RESTORE_WINDOW(SBP): return \
 724
 725def STORE_FPREGS(FP): return \
 726
 727def LOAD_FPREGS(FP): return \
 728
 729_SPARC_MAXREGWINDOW = 31
 730_XRS_ID = 0x78727300
 731GETCONTEXT = 0
 732SETCONTEXT = 1
 733UC_SIGMASK = 001
 734UC_STACK = 002
 735UC_CPU = 004
 736UC_MAU = 010
 737UC_FPU = UC_MAU
 738UC_INTR = 020
 739UC_ASR = 040
 740UC_MCONTEXT = (UC_CPU|UC_FPU|UC_ASR)
 741UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT)
 742_SIGQUEUE_MAX = 32
 743_SIGNOTIFY_MAX = 32
 744
 745# Included from sys/pcb.h
 746INSTR_VALID = 0x02
 747NORMAL_STEP = 0x04
 748WATCH_STEP = 0x08
 749CPC_OVERFLOW = 0x10
 750ASYNC_HWERR = 0x20
 751STEP_NONE = 0
 752STEP_REQUESTED = 1
 753STEP_ACTIVE = 2
 754STEP_WASACTIVE = 3
 755
 756# Included from sys/msacct.h
 757LMS_USER = 0
 758LMS_SYSTEM = 1
 759LMS_TRAP = 2
 760LMS_TFAULT = 3
 761LMS_DFAULT = 4
 762LMS_KFAULT = 5
 763LMS_USER_LOCK = 6
 764LMS_SLEEP = 7
 765LMS_WAIT_CPU = 8
 766LMS_STOPPED = 9
 767NMSTATES = 10
 768
 769# Included from sys/lwp.h
 770
 771# Included from sys/synch.h
 772from TYPES import *
 773USYNC_THREAD = 0x00
 774USYNC_PROCESS = 0x01
 775LOCK_NORMAL = 0x00
 776LOCK_ERRORCHECK = 0x02
 777LOCK_RECURSIVE = 0x04
 778USYNC_PROCESS_ROBUST = 0x08
 779LOCK_PRIO_NONE = 0x00
 780LOCK_PRIO_INHERIT = 0x10
 781LOCK_PRIO_PROTECT = 0x20
 782LOCK_STALL_NP = 0x00
 783LOCK_ROBUST_NP = 0x40
 784LOCK_OWNERDEAD = 0x1
 785LOCK_NOTRECOVERABLE = 0x2
 786LOCK_INITED = 0x4
 787LOCK_UNMAPPED = 0x8
 788LWP_DETACHED = 0x00000040
 789LWP_SUSPENDED = 0x00000080
 790__LWP_ASLWP = 0x00000100
 791MAXSYSARGS = 8
 792NORMALRETURN = 0
 793JUSTRETURN = 1
 794LWP_USER = 0x01
 795LWP_SYS = 0x02
 796TS_FREE = 0x00
 797TS_SLEEP = 0x01
 798TS_RUN = 0x02
 799TS_ONPROC = 0x04
 800TS_ZOMB = 0x08
 801TS_STOPPED = 0x10
 802T_INTR_THREAD = 0x0001
 803T_WAKEABLE = 0x0002
 804T_TOMASK = 0x0004
 805T_TALLOCSTK = 0x0008
 806T_WOULDBLOCK = 0x0020
 807T_DONTBLOCK = 0x0040
 808T_DONTPEND = 0x0080
 809T_SYS_PROF = 0x0100
 810T_WAITCVSEM = 0x0200
 811T_WATCHPT = 0x0400
 812T_PANIC = 0x0800
 813TP_HOLDLWP = 0x0002
 814TP_TWAIT = 0x0004
 815TP_LWPEXIT = 0x0008
 816TP_PRSTOP = 0x0010
 817TP_CHKPT = 0x0020
 818TP_EXITLWP = 0x0040
 819TP_PRVSTOP = 0x0080
 820TP_MSACCT = 0x0100
 821TP_STOPPING = 0x0200
 822TP_WATCHPT = 0x0400
 823TP_PAUSE = 0x0800
 824TP_CHANGEBIND = 0x1000
 825TS_LOAD = 0x0001
 826TS_DONT_SWAP = 0x0002
 827TS_SWAPENQ = 0x0004
 828TS_ON_SWAPQ = 0x0008
 829TS_CSTART = 0x0100
 830TS_UNPAUSE = 0x0200
 831TS_XSTART = 0x0400
 832TS_PSTART = 0x0800
 833TS_RESUME = 0x1000
 834TS_CREATE = 0x2000
 835TS_ALLSTART = \
 836        (TS_CSTART|TS_UNPAUSE|TS_XSTART|TS_PSTART|TS_RESUME|TS_CREATE)
 837def CPR_VSTOPPED(t): return \
 838
 839def THREAD_TRANSITION(tp): return thread_transition(tp);
 840
 841def THREAD_STOP(tp): return \
 842
 843def THREAD_ZOMB(tp): return THREAD_SET_STATE(tp, TS_ZOMB, NULL)
 844
 845def SEMA_HELD(x): return (sema_held((x)))
 846
 847NO_LOCKS_HELD = 1
 848NO_COMPETING_THREADS = 1
 849FMNAMESZ = 8
 850
 851# Included from sys/systm.h
 852from TYPES import *
 853
 854# Included from sys/proc.h
 855
 856# Included from sys/cred.h
 857
 858# Included from sys/user.h
 859from TYPES import *
 860
 861# Included from sys/resource.h
 862from TYPES import *
 863PRIO_PROCESS = 0
 864PRIO_PGRP = 1
 865PRIO_USER = 2
 866RLIMIT_CPU = 0
 867RLIMIT_FSIZE = 1
 868RLIMIT_DATA = 2
 869RLIMIT_STACK = 3
 870RLIMIT_CORE = 4
 871RLIMIT_NOFILE = 5
 872RLIMIT_VMEM = 6
 873RLIMIT_AS = RLIMIT_VMEM
 874RLIM_NLIMITS = 7
 875RLIM_INFINITY = (-3l)
 876RLIM_SAVED_MAX = (-2l)
 877RLIM_SAVED_CUR = (-1l)
 878RLIM_INFINITY = 0x7fffffff
 879RLIM_SAVED_MAX = 0x7ffffffe
 880RLIM_SAVED_CUR = 0x7ffffffd
 881RLIM32_INFINITY = 0x7fffffff
 882RLIM32_SAVED_MAX = 0x7ffffffe
 883RLIM32_SAVED_CUR = 0x7ffffffd
 884
 885# Included from sys/model.h
 886
 887# Included from sys/debug.h
 888def ASSERT64(x): return ASSERT(x)
 889
 890def ASSERT32(x): return ASSERT(x)
 891
 892DATAMODEL_MASK = 0x0FF00000
 893DATAMODEL_ILP32 = 0x00100000
 894DATAMODEL_LP64 = 0x00200000
 895DATAMODEL_NONE = 0
 896DATAMODEL_NATIVE = DATAMODEL_LP64
 897DATAMODEL_NATIVE = DATAMODEL_ILP32
 898def STRUCT_SIZE(handle): return \
 899
 900def STRUCT_BUF(handle): return ((handle).ptr.m64)
 901
 902def SIZEOF_PTR(umodel): return \
 903
 904def STRUCT_SIZE(handle): return (sizeof (*(handle).ptr))
 905
 906def STRUCT_BUF(handle): return ((handle).ptr)
 907
 908def SIZEOF_PTR(umodel): return sizeof (caddr_t)
 909
 910def lwp_getdatamodel(t): return DATAMODEL_ILP32
 911
 912RUSAGE_SELF = 0
 913RUSAGE_CHILDREN = -1
 914
 915# Included from sys/auxv.h
 916AT_NULL = 0
 917AT_IGNORE = 1
 918AT_EXECFD = 2
 919AT_PHDR = 3
 920AT_PHENT = 4
 921AT_PHNUM = 5
 922AT_PAGESZ = 6
 923AT_BASE = 7
 924AT_FLAGS = 8
 925AT_ENTRY = 9
 926AT_DCACHEBSIZE = 10
 927AT_ICACHEBSIZE = 11
 928AT_UCACHEBSIZE = 12
 929AT_SUN_UID = 2000
 930AT_SUN_RUID = 2001
 931AT_SUN_GID = 2002
 932AT_SUN_RGID = 2003
 933AT_SUN_LDELF = 2004
 934AT_SUN_LDSHDR = 2005
 935AT_SUN_LDNAME = 2006
 936AT_SUN_LPAGESZ = 2007
 937AT_SUN_PLATFORM = 2008
 938AT_SUN_HWCAP = 2009
 939AT_SUN_IFLUSH = 2010
 940AT_SUN_CPU = 2011
 941AT_SUN_EMUL_ENTRY = 2012
 942AT_SUN_EMUL_EXECFD = 2013
 943AT_SUN_EXECNAME = 2014
 944AT_SUN_MMU = 2015
 945
 946# Included from sys/errno.h
 947EPERM = 1
 948ENOENT = 2
 949ESRCH = 3
 950EINTR = 4
 951EIO = 5
 952ENXIO = 6
 953E2BIG = 7
 954ENOEXEC = 8
 955EBADF = 9
 956ECHILD = 10
 957EAGAIN = 11
 958ENOMEM = 12
 959EACCES = 13
 960EFAULT = 14
 961ENOTBLK = 15
 962EBUSY = 16
 963EEXIST = 17
 964EXDEV = 18
 965ENODEV = 19
 966ENOTDIR = 20
 967EISDIR = 21
 968EINVAL = 22
 969ENFILE = 23
 970EMFILE = 24
 971ENOTTY = 25
 972ETXTBSY = 26
 973EFBIG = 27
 974ENOSPC = 28
 975ESPIPE = 29
 976EROFS = 30
 977EMLINK = 31
 978EPIPE = 32
 979EDOM = 33
 980ERANGE = 34
 981ENOMSG = 35
 982EIDRM = 36
 983ECHRNG = 37
 984EL2NSYNC = 38
 985EL3HLT = 39
 986EL3RST = 40
 987ELNRNG = 41
 988EUNATCH = 42
 989ENOCSI = 43
 990EL2HLT = 44
 991EDEADLK = 45
 992ENOLCK = 46
 993ECANCELED = 47
 994ENOTSUP = 48
 995EDQUOT = 49
 996EBADE = 50
 997EBADR = 51
 998EXFULL = 52
 999ENOANO = 53
1000EBADRQC = 54
1001EBADSLT = 55
1002EDEADLOCK = 56
1003EBFONT = 57
1004EOWNERDEAD = 58
1005ENOTRECOVERABLE = 59
1006ENOSTR = 60
1007ENODATA = 61
1008ETIME = 62
1009ENOSR = 63
1010ENONET = 64
1011ENOPKG = 65
1012EREMOTE = 66
1013ENOLINK = 67
1014EADV = 68
1015ESRMNT = 69
1016ECOMM = 70
1017EPROTO = 71
1018ELOCKUNMAPPED = 72
1019ENOTACTIVE = 73
1020EMULTIHOP = 74
1021EBADMSG = 77
1022ENAMETOOLONG = 78
1023EOVERFLOW = 79
1024ENOTUNIQ = 80
1025EBADFD = 81
1026EREMCHG = 82
1027ELIBACC = 83
1028ELIBBAD = 84
1029ELIBSCN = 85
1030ELIBMAX = 86
1031ELIBEXEC = 87
1032EILSEQ = 88
1033ENOSYS = 89
1034ELOOP = 90
1035ERESTART = 91
1036ESTRPIPE = 92
1037ENOTEMPTY = 93
1038EUSERS = 94
1039ENOTSOCK = 95
1040EDESTADDRREQ = 96
1041EMSGSIZE = 97
1042EPROTOTYPE = 98
1043ENOPROTOOPT = 99
1044EPROTONOSUPPORT = 120
1045ESOCKTNOSUPPORT = 121
1046EOPNOTSUPP = 122
1047EPFNOSUPPORT = 123
1048EAFNOSUPPORT = 124
1049EADDRINUSE = 125
1050EADDRNOTAVAIL = 126
1051ENETDOWN = 127
1052ENETUNREACH = 128
1053ENETRESET = 129
1054ECONNABORTED = 130
1055ECONNRESET = 131
1056ENOBUFS = 132
1057EISCONN = 133
1058ENOTCONN = 134
1059ESHUTDOWN = 143
1060ETOOMANYREFS = 144
1061ETIMEDOUT = 145
1062ECONNREFUSED = 146
1063EHOSTDOWN = 147
1064EHOSTUNREACH = 148
1065EWOULDBLOCK = EAGAIN
1066EALREADY = 149
1067EINPROGRESS = 150
1068ESTALE = 151
1069PSARGSZ = 80
1070PSCOMSIZ = 14
1071MAXCOMLEN = 16
1072__KERN_NAUXV_IMPL = 19
1073__KERN_NAUXV_IMPL = 21
1074__KERN_NAUXV_IMPL = 21
1075PSARGSZ = 80
1076
1077# Included from sys/watchpoint.h
1078from TYPES import *
1079
1080# Included from vm/seg_enum.h
1081
1082# Included from sys/copyops.h
1083from TYPES import *
1084
1085# Included from sys/buf.h
1086
1087# Included from sys/kstat.h
1088from TYPES import *
1089KSTAT_STRLEN = 31
1090def KSTAT_ENTER(k): return \
1091
1092def KSTAT_EXIT(k): return \
1093
1094KSTAT_TYPE_RAW = 0
1095KSTAT_TYPE_NAMED = 1
1096KSTAT_TYPE_INTR = 2
1097KSTAT_TYPE_IO = 3
1098KSTAT_TYPE_TIMER = 4
1099KSTAT_NUM_TYPES = 5
1100KSTAT_FLAG_VIRTUAL = 0x01
1101KSTAT_FLAG_VAR_SIZE = 0x02
1102KSTAT_FLAG_WRITABLE = 0x04
1103KSTAT_FLAG_PERSISTENT = 0x08
1104KSTAT_FLAG_DORMANT = 0x10
1105KSTAT_FLAG_INVALID = 0x20
1106KSTAT_READ = 0
1107KSTAT_WRITE = 1
1108KSTAT_DATA_CHAR = 0
1109KSTAT_DATA_INT32 = 1
1110KSTAT_DATA_UINT32 = 2
1111KSTAT_DATA_INT64 = 3
1112KSTAT_DATA_UINT64 = 4
1113KSTAT_DATA_LONG = KSTAT_DATA_INT32
1114KSTAT_DATA_ULONG = KSTAT_DATA_UINT32
1115KSTAT_DATA_LONG = KSTAT_DATA_INT64
1116KSTAT_DATA_ULONG = KSTAT_DATA_UINT64
1117KSTAT_DATA_LONG = 7
1118KSTAT_DATA_ULONG = 8
1119KSTAT_DATA_LONGLONG = KSTAT_DATA_INT64
1120KSTAT_DATA_ULONGLONG = KSTAT_DATA_UINT64
1121KSTAT_DATA_FLOAT = 5
1122KSTAT_DATA_DOUBLE = 6
1123KSTAT_INTR_HARD = 0
1124KSTAT_INTR_SOFT = 1
1125KSTAT_INTR_WATCHDOG = 2
1126KSTAT_INTR_SPURIOUS = 3
1127KSTAT_INTR_MULTSVC = 4
1128KSTAT_NUM_INTRS = 5
1129B_BUSY = 0x0001
1130B_DONE = 0x0002
1131B_ERROR = 0x0004
1132B_PAGEIO = 0x0010
1133B_PHYS = 0x0020
1134B_READ = 0x0040
1135B_WRITE = 0x0100
1136B_KERNBUF = 0x0008
1137B_WANTED = 0x0080
1138B_AGE = 0x000200
1139B_ASYNC = 0x000400
1140B_DELWRI = 0x000800
1141B_STALE = 0x001000
1142B_DONTNEED = 0x002000
1143B_REMAPPED = 0x004000
1144B_FREE = 0x008000
1145B_INVAL = 0x010000
1146B_FORCE = 0x020000
1147B_HEAD = 0x040000
1148B_NOCACHE = 0x080000
1149B_TRUNC = 0x100000
1150B_SHADOW = 0x200000
1151B_RETRYWRI = 0x400000
1152def notavail(bp): return \
1153
1154def BWRITE(bp): return \
1155
1156def BWRITE2(bp): return \
1157
1158
1159# Included from sys/aio_req.h
1160
1161# Included from sys/uio.h
1162from TYPES import *
1163WP_NOWATCH = 0x01
1164WP_SETPROT = 0x02
1165
1166# Included from sys/timer.h
1167from TYPES import *
1168_TIMER_MAX = 32
1169ITLK_LOCKED = 0x01
1170ITLK_WANTED = 0x02
1171ITLK_REMOVE = 0x04
1172IT_PERLWP = 0x01
1173IT_SIGNAL = 0x02
1174
1175# Included from sys/utrap.h
1176UT_INSTRUCTION_DISABLED = 1
1177UT_INSTRUCTION_ERROR = 2
1178UT_INSTRUCTION_PROTECTION = 3
1179UT_ILLTRAP_INSTRUCTION = 4
1180UT_ILLEGAL_INSTRUCTION = 5
1181UT_PRIVILEGED_OPCODE = 6
1182UT_FP_DISABLED = 7
1183UT_FP_EXCEPTION_IEEE_754 = 8
1184UT_FP_EXCEPTION_OTHER = 9
1185UT_TAG_OVERFLOW = 10
1186UT_DIVISION_BY_ZERO = 11
1187UT_DATA_EXCEPTION = 12
1188UT_DATA_ERROR = 13
1189UT_DATA_PROTECTION = 14
1190UT_MEM_ADDRESS_NOT_ALIGNED = 15
1191UT_PRIVILEGED_ACTION = 16
1192UT_ASYNC_DATA_ERROR = 17
1193UT_TRAP_INSTRUCTION_16 = 18
1194UT_TRAP_INSTRUCTION_17 = 19
1195UT_TRAP_INSTRUCTION_18 = 20
1196UT_TRAP_INSTRUCTION_19 = 21
1197UT_TRAP_INSTRUCTION_20 = 22
1198UT_TRAP_INSTRUCTION_21 = 23
1199UT_TRAP_INSTRUCTION_22 = 24
1200UT_TRAP_INSTRUCTION_23 = 25
1201UT_TRAP_INSTRUCTION_24 = 26
1202UT_TRAP_INSTRUCTION_25 = 27
1203UT_TRAP_INSTRUCTION_26 = 28
1204UT_TRAP_INSTRUCTION_27 = 29
1205UT_TRAP_INSTRUCTION_28 = 30
1206UT_TRAP_INSTRUCTION_29 = 31
1207UT_TRAP_INSTRUCTION_30 = 32
1208UT_TRAP_INSTRUCTION_31 = 33
1209UTRAP_V8P_FP_DISABLED = UT_FP_DISABLED
1210UTRAP_V8P_MEM_ADDRESS_NOT_ALIGNED = UT_MEM_ADDRESS_NOT_ALIGNED
1211UT_PRECISE_MAXTRAPS = 33
1212
1213# Included from sys/refstr.h
1214
1215# Included from sys/task.h
1216from TYPES import *
1217TASK_NORMAL = 0x0
1218TASK_FINAL = 0x1
1219TASK_FINALITY = 0x1
1220
1221# Included from sys/id_space.h
1222from TYPES import *
1223
1224# Included from sys/vmem.h
1225from TYPES import *
1226VM_SLEEP = 0x00000000
1227VM_NOSLEEP = 0x00000001
1228VM_PANIC = 0x00000002
1229VM_KMFLAGS = 0x000000ff
1230VM_BESTFIT = 0x00000100
1231VMEM_ALLOC = 0x01
1232VMEM_FREE = 0x02
1233VMEM_SPAN = 0x10
1234ISP_NORMAL = 0x0
1235ISP_RESERVE = 0x1
1236
1237# Included from sys/exacct_impl.h
1238from TYPES import *
1239
1240# Included from sys/kmem.h
1241from TYPES import *
1242KM_SLEEP = 0x0000
1243KM_NOSLEEP = 0x0001
1244KM_PANIC = 0x0002
1245KM_VMFLAGS = 0x00ff
1246KM_FLAGS = 0xffff
1247KMC_NOTOUCH = 0x00010000
1248KMC_NODEBUG = 0x00020000
1249KMC_NOMAGAZINE = 0x00040000
1250KMC_NOHASH = 0x00080000
1251KMC_QCACHE = 0x00100000
1252_ISA_IA32 = 0
1253_ISA_IA64 = 1
1254SSLEEP = 1
1255SRUN = 2
1256SZOMB = 3
1257SSTOP = 4
1258SIDL = 5
1259SONPROC = 6
1260CLDPEND = 0x0001
1261CLDCONT = 0x0002
1262SSYS = 0x00000001
1263STRC = 0x00000002
1264SLOAD = 0x00000008
1265SLOCK = 0x00000010
1266SPREXEC = 0x00000020
1267SPROCTR = 0x00000040
1268SPRFORK = 0x00000080
1269SKILLED = 0x00000100
1270SULOAD = 0x00000200
1271SRUNLCL = 0x00000400
1272SBPTADJ = 0x00000800
1273SKILLCL = 0x00001000
1274SOWEUPC = 0x00002000
1275SEXECED = 0x00004000
1276SPASYNC = 0x00008000
1277SJCTL = 0x00010000
1278SNOWAIT = 0x00020000
1279SVFORK = 0x00040000
1280SVFWAIT = 0x00080000
1281EXITLWPS = 0x00100000
1282HOLDFORK = 0x00200000
1283SWAITSIG = 0x00400000
1284HOLDFORK1 = 0x00800000
1285COREDUMP = 0x01000000
1286SMSACCT = 0x02000000
1287ASLWP = 0x04000000
1288SPRLOCK = 0x08000000
1289NOCD = 0x10000000
1290HOLDWATCH = 0x20000000
1291SMSFORK = 0x40000000
1292SDOCORE = 0x80000000
1293FORREAL = 0
1294JUSTLOOKING = 1
1295SUSPEND_NORMAL = 0
1296SUSPEND_PAUSE = 1
1297NOCLASS = (-1)
1298
1299# Included from sys/dditypes.h
1300DDI_DEVICE_ATTR_V0 = 0x0001
1301DDI_NEVERSWAP_ACC = 0x00
1302DDI_STRUCTURE_LE_ACC = 0x01
1303DDI_STRUCTURE_BE_ACC = 0x02
1304DDI_STRICTORDER_ACC = 0x00
1305DDI_UNORDERED_OK_ACC = 0x01
1306DDI_MERGING_OK_ACC = 0x02
1307DDI_LOADCACHING_OK_ACC = 0x03
1308DDI_STORECACHING_OK_ACC = 0x04
1309DDI_DATA_SZ01_ACC = 1
1310DDI_DATA_SZ02_ACC = 2
1311DDI_DATA_SZ04_ACC = 4
1312DDI_DATA_SZ08_ACC = 8
1313VERS_ACCHDL = 0x0001
1314DEVID_NONE = 0
1315DEVID_SCSI3_WWN = 1
1316DEVID_SCSI_SERIAL = 2
1317DEVID_FAB = 3
1318DEVID_ENCAP = 4
1319DEVID_MAXTYPE = 4
1320
1321# Included from sys/varargs.h
1322
1323# Included from sys/va_list.h
1324VA_ALIGN = 8
1325def _ARGSIZEOF(t): return ((sizeof (t) + VA_ALIGN - 1) & ~(VA_ALIGN - 1))
1326
1327VA_ALIGN = 8
1328def _ARGSIZEOF(t): return ((sizeof (t) + VA_ALIGN - 1) & ~(VA_ALIGN - 1))
1329
1330NSYSCALL = 256
1331SE_32RVAL1 = 0x0
1332SE_32RVAL2 = 0x1
1333SE_64RVAL = 0x2
1334SE_RVAL_MASK = 0x3
1335SE_LOADABLE = 0x08
1336SE_LOADED = 0x10
1337SE_NOUNLOAD = 0x20
1338SE_ARGC = 0x40
1339
1340# Included from sys/devops.h
1341from TYPES import *
1342
1343# Included from sys/poll.h
1344POLLIN = 0x0001
1345POLLPRI = 0x0002
1346POLLOUT = 0x0004
1347POLLRDNORM = 0x0040
1348POLLWRNORM = POLLOUT
1349POLLRDBAND = 0x0080
1350POLLWRBAND = 0x0100
1351POLLNORM = POLLRDNORM
1352POLLERR = 0x0008
1353POLLHUP = 0x0010
1354POLLNVAL = 0x0020
1355POLLREMOVE = 0x0800
1356POLLRDDATA = 0x0200
1357POLLNOERR = 0x0400
1358POLLCLOSED = 0x8000
1359
1360# Included from vm/as.h
1361
1362# Included from vm/seg.h
1363
1364# Included from sys/vnode.h
1365from TYPES import *
1366VROOT = 0x01
1367VNOCACHE = 0x02
1368VNOMAP = 0x04
1369VDUP = 0x08
1370VNOSWAP = 0x10
1371VNOMOUNT = 0x20
1372VISSWAP = 0x40
1373VSWAPLIKE = 0x80
1374VVFSLOCK = 0x100
1375VVFSWAIT = 0x200
1376VVMLOCK = 0x400
1377VDIROPEN = 0x800
1378VVMEXEC = 0x1000
1379VPXFS = 0x2000
1380AT_TYPE = 0x0001
1381AT_MODE = 0x0002
1382AT_UID = 0x0004
1383AT_GID = 0x0008
1384AT_FSID = 0x0010
1385AT_NODEID = 0x0020
1386AT_NLINK = 0x0040
1387AT_SIZE = 0x0080
1388AT_ATIME = 0x0100
1389AT_MTIME = 0x0200
1390AT_CTIME = 0x0400
1391AT_RDEV = 0x0800
1392AT_BLKSIZE = 0x1000
1393AT_NBLOCKS = 0x2000
1394AT_VCODE = 0x4000
1395AT_ALL = (AT_TYPE|AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|\
1396                        AT_NLINK|AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|\
1397                        AT_RDEV|AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1398AT_STAT = (AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|AT_NLINK|\
1399                        AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|AT_RDEV)
1400AT_TIMES = (AT_ATIME|AT_MTIME|AT_CTIME)
1401AT_NOSET = (AT_NLINK|AT_RDEV|AT_FSID|AT_NODEID|AT_TYPE|\
1402                        AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1403VSUID = 04000
1404VSGID = 02000
1405VSVTX = 01000
1406VREAD = 00400
1407VWRITE = 00200
1408VEXEC = 00100
1409MODEMASK = 07777
1410PERMMASK = 00777
1411def MANDMODE(mode): return (((mode) & (VSGID|(VEXEC>>3))) == VSGID)
1412
1413VSA_ACL = 0x0001
1414VSA_ACLCNT = 0x0002
1415VSA_DFACL = 0x0004
1416VSA_DFACLCNT = 0x0008
1417LOOKUP_DIR = 0x01
1418DUMP_ALLOC = 0
1419DUMP_FREE = 1
1420DUMP_SCAN = 2
1421ATTR_UTIME = 0x01
1422ATTR_EXEC = 0x02
1423ATTR_COMM = 0x04
1424ATTR_HINT = 0x08
1425ATTR_REAL = 0x10
1426
1427# Included from vm/faultcode.h
1428FC_HWERR = 0x1
1429FC_ALIGN = 0x2
1430FC_OBJERR = 0x3
1431FC_PROT = 0x4
1432FC_NOMAP = 0x5
1433FC_NOSUPPORT = 0x6
1434def FC_MAKE_ERR(e): return (((e) << 8) | FC_OBJERR)
1435
1436def FC_CODE(fc): return ((fc) & 0xff)
1437
1438def FC_ERRNO(fc): return ((unsigned)(fc) >> 8)
1439
1440
1441# Included from vm/hat.h
1442from TYPES import *
1443
1444# Included from vm/page.h
1445PAGE_HASHAVELEN = 4
1446PAGE_HASHVPSHIFT = 6
1447PG_EXCL = 0x0001
1448PG_WAIT = 0x0002
1449PG_PHYSCONTIG = 0x0004
1450PG_MATCH_COLOR = 0x0008
1451PG_NORELOC = 0x0010
1452PG_FREE_LIST = 1
1453PG_CACHE_LIST = 2
1454PG_LIST_TAIL = 0
1455PG_LIST_HEAD = 1
1456def page_next_raw(PP): return page_nextn_raw((PP), 1)
1457
1458PAGE_IO_INUSE = 0x1
1459PAGE_IO_WANTED = 0x2
1460PGREL_NOTREL = 0x1
1461PGREL_CLEAN = 0x2
1462PGREL_MOD = 0x3
1463P_FREE = 0x80
1464P_NORELOC = 0x40
1465def PP_SETAGED(pp): return ASSERT(PP_ISAGED(pp))
1466
1467HAT_FLAGS_RESV = 0xFF000000
1468HAT_LOAD = 0x00
1469HAT_LOAD_LOCK = 0x01
1470HAT_LOAD_ADV = 0x04
1471HAT_LOAD_CONTIG = 0x10
1472HAT_LOAD_NOCONSIST = 0x20
1473HAT_LOAD_SHARE = 0x40
1474HAT_LOAD_REMAP = 0x80
1475HAT_RELOAD_SHARE = 0x100
1476HAT_PLAT_ATTR_MASK = 0xF00000
1477HAT_PROT_MASK = 0x0F
1478HAT_NOFAULT = 0x10
1479HAT_NOSYNC = 0x20
1480HAT_STRICTORDER = 0x0000
1481HAT_UNORDERED_OK = 0x0100
1482HAT_MERGING_OK = 0x0200
1483HAT_LOADCACHING_OK = 0x0300
1484HAT_STORECACHING_OK = 0x0400
1485HAT_ORDER_MASK = 0x0700
1486HAT_NEVERSWAP = 0x0000
1487HAT_STRUCTURE_BE = 0x1000
1488HAT_STRUCTURE_LE = 0x2000
1489HAT_ENDIAN_MASK = 0x3000
1490HAT_COW = 0x0001
1491HAT_UNLOAD = 0x00
1492HAT_UNLOAD_NOSYNC = 0x02
1493HAT_UNLOAD_UNLOCK = 0x04
1494HAT_UNLOAD_OTHER = 0x08
1495HAT_UNLOAD_UNMAP = 0x10
1496HAT_SYNC_DONTZERO = 0x00
1497HAT_SYNC_ZERORM = 0x01
1498HAT_SYNC_STOPON_REF = 0x02
1499HAT_SYNC_STOPON_MOD = 0x04
1500HAT_SYNC_STOPON_RM = (HAT_SYNC_STOPON_REF | HAT_SYNC_STOPON_MOD)
1501HAT_DUP_ALL = 1
1502HAT_DUP_COW = 2
1503HAT_MAP = 0x00
1504HAT_ADV_PGUNLOAD = 0x00
1505HAT_FORCE_PGUNLOAD = 0x01
1506P_MOD = 0x1
1507P_REF = 0x2
1508P_RO = 0x4
1509def hat_ismod(pp): return (hat_page_getattr(pp, P_MOD))
1510
1511def hat_isref(pp): return (hat_page_getattr(pp, P_REF))
1512
1513def hat_isro(pp): return (hat_page_getattr(pp, P_RO))
1514
1515def hat_setmod(pp): return (hat_page_setattr(pp, P_MOD))
1516
1517def hat_setref(pp): return (hat_page_setattr(pp, P_REF))
1518
1519def hat_setrefmod(pp): return (hat_page_setattr(pp, P_REF|P_MOD))
1520
1521def hat_clrmod(pp): return (hat_page_clrattr(pp, P_MOD))
1522
1523def hat_clrref(pp): return (hat_page_clrattr(pp, P_REF))
1524
1525def hat_clrrefmod(pp): return (hat_page_clrattr(pp, P_REF|P_MOD))
1526
1527def hat_page_is_mapped(pp): return (hat_page_getshare(pp))
1528
1529HAT_DONTALLOC = 0
1530HAT_ALLOC = 1
1531HRM_SHIFT = 4
1532HRM_BYTES = (1 << HRM_SHIFT)
1533HRM_PAGES = ((HRM_BYTES * NBBY) / 2)
1534HRM_PGPERBYTE = (NBBY/2)
1535HRM_PGBYTEMASK = (HRM_PGPERBYTE-1)
1536HRM_HASHSIZE = 0x200
1537HRM_HASHMASK = (HRM_HASHSIZE - 1)
1538HRM_BLIST_INCR = 0x200
1539HRM_SWSMONID = 1
1540SSL_NLEVELS = 4
1541SSL_BFACTOR = 4
1542SSL_LOG2BF = 2
1543SEGP_ASYNC_FLUSH = 0x1
1544SEGP_FORCE_WIRED = 0x2
1545SEGP_SUCCESS = 0
1546SEGP_FAIL = 1
1547def seg_pages(seg): return \
1548
1549IE_NOMEM = -1
1550AS_PAGLCK = 0x80
1551AS_CLAIMGAP = 0x40
1552AS_UNMAPWAIT = 0x20
1553def AS_TYPE_64BIT(as_): return \
1554
1555AS_LREP_LINKEDLIST = 0
1556AS_LREP_SKIPLIST = 1
1557AS_MUTATION_THRESH = 225
1558AH_DIR = 0x1
1559AH_LO = 0x0
1560AH_HI = 0x1
1561AH_CONTAIN = 0x2
1562
1563# Included from sys/ddidmareq.h
1564DMA_UNIT_8 = 1
1565DMA_UNIT_16 = 2
1566DMA_UNIT_32 = 4
1567DMALIM_VER0 = ((0x86000000) + 0)
1568DDI_DMA_FORCE_PHYSICAL = 0x0100
1569DMA_ATTR_V0 = 0
1570DMA_ATTR_VERSION = DMA_ATTR_V0
1571DDI_DMA_CALLBACK_RUNOUT = 0
1572DDI_DMA_CALLBACK_DONE = 1
1573DDI_DMA_WRITE = 0x0001
1574DDI_DMA_READ = 0x0002
1575DDI_DMA_RDWR = (DDI_DMA_READ | DDI_DMA_WRITE)
1576DDI_DMA_REDZONE = 0x0004
1577DDI_DMA_PARTIAL = 0x0008
1578DDI_DMA_CONSISTENT = 0x0010
1579DDI_DMA_EXCLUSIVE = 0x0020
1580DDI_DMA_STREAMING = 0x0040
1581DDI_DMA_SBUS_64BIT = 0x2000
1582DDI_DMA_MAPPED = 0
1583DDI_DMA_MAPOK = 0
1584DDI_DMA_PARTIAL_MAP = 1
1585DDI_DMA_DONE = 2
1586DDI_DMA_NORESOURCES = -1
1587DDI_DMA_NOMAPPING = -2
1588DDI_DMA_TOOBIG = -3
1589DDI_DMA_TOOSMALL = -4
1590DDI_DMA_LOCKED = -5
1591DDI_DMA_BADLIMITS = -6
1592DDI_DMA_STALE = -7
1593DDI_DMA_BADATTR = -8
1594DDI_DMA_INUSE = -9
1595DDI_DMA_SYNC_FORDEV = 0x0
1596DDI_DMA_SYNC_FORCPU = 0x1
1597DDI_DMA_SYNC_FORKERNEL = 0x2
1598
1599# Included from sys/ddimapreq.h
1600
1601# Included from sys/mman.h
1602PROT_READ = 0x1
1603PROT_WRITE = 0x2
1604PROT_EXEC = 0x4
1605PROT_USER = 0x8
1606PROT_ZFOD = (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
1607PROT_ALL = (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
1608PROT_NONE = 0x0
1609MAP_SHARED = 1
1610MAP_PRIVATE = 2
1611MAP_TYPE = 0xf
1612MAP_FIXED = 0x10
1613MAP_NORESERVE = 0x40
1614MAP_ANON = 0x100
1615MAP_ANONYMOUS = MAP_ANON
1616MAP_RENAME = 0x20
1617PROC_TEXT = (PROT_EXEC | PROT_READ)
1618PROC_DATA = (PROT_READ | PROT_WRITE | PROT_EXEC)
1619SHARED = 0x10
1620PRIVATE = 0x20
1621VALID_ATTR = (PROT_READ|PROT_WRITE|PROT_EXEC|SHARED|PRIVATE)
1622PROT_EXCL = 0x20
1623_MAP_LOW32 = 0x80
1624_MAP_NEW = 0x80000000
1625from TYPES import *
1626MADV_NORMAL = 0
1627MADV_RANDOM = 1
1628MADV_SEQUENTIAL = 2
1629MADV_WILLNEED = 3
1630MADV_DONTNEED = 4
1631MADV_FREE = 5
1632MS_OLDSYNC = 0x0
1633MS_SYNC = 0x4
1634MS_ASYNC = 0x1
1635MS_INVALIDATE = 0x2
1636MC_SYNC = 1
1637MC_LOCK = 2
1638MC_UNLOCK = 3
1639MC_ADVISE = 4
1640MC_LOCKAS = 5
1641MC_UNLOCKAS = 6
1642MCL_CURRENT = 0x1
1643MCL_FUTURE = 0x2
1644DDI_MAP_VERSION = 0x0001
1645DDI_MF_USER_MAPPING = 0x1
1646DDI_MF_KERNEL_MAPPING = 0x2
1647DDI_MF_DEVICE_MAPPING = 0x4
1648DDI_ME_GENERIC = (-1)
1649DDI_ME_UNIMPLEMENTED = (-2)
1650DDI_ME_NORESOURCES = (-3)
1651DDI_ME_UNSUPPORTED = (-4)
1652DDI_ME_REGSPEC_RANGE = (-5)
1653DDI_ME_RNUMBER_RANGE = (-6)
1654DDI_ME_INVAL = (-7)
1655
1656# Included from sys/ddipropdefs.h
1657def CELLS_1275_TO_BYTES(n): return ((n) * PROP_1275_CELL_SIZE)
1658
1659def BYTES_TO_1275_CELLS(n): return ((n) / PROP_1275_CELL_SIZE)
1660
1661PH_FROM_PROM = 0x01
1662DDI_PROP_SUCCESS = 0
1663DDI_PROP_NOT_FOUND = 1
1664DDI_PROP_UNDEFINED = 2
1665DDI_PROP_NO_MEMORY = 3
1666DDI_PROP_INVAL_ARG = 4
1667DDI_PROP_BUF_TOO_SMALL = 5
1668DDI_PROP_CANNOT_DECODE = 6
1669DDI_PROP_CANNOT_ENCODE = 7
1670DDI_PROP_END_OF_DATA = 8
1671DDI_PROP_FOUND_1275 = 255
1672PROP_1275_INT_SIZE = 4
1673DDI_PROP_DONTPASS = 0x0001
1674DDI_PROP_CANSLEEP = 0x0002
1675DDI_PROP_SYSTEM_DEF = 0x0004
1676DDI_PROP_NOTPROM = 0x0008
1677DDI_PROP_DONTSLEEP = 0x0010
1678DDI_PROP_STACK_CREATE = 0x0020
1679DDI_PROP_UNDEF_IT = 0x0040
1680DDI_PROP_HW_DEF = 0x0080
1681DDI_PROP_TYPE_INT = 0x0100
1682DDI_PROP_TYPE_STRING = 0x0200
1683DDI_PROP_TYPE_BYTE = 0x0400
1684DDI_PROP_TYPE_COMPOSITE = 0x0800
1685DDI_PROP_TYPE_ANY = (DDI_PROP_TYPE_INT  |       \
1686                                        DDI_PROP_TYPE_STRING    |       \
1687                                        DDI_PROP_TYPE_BYTE      |       \
1688                                        DDI_PROP_TYPE_COMPOSITE)
1689DDI_PROP_TYPE_MASK = (DDI_PROP_TYPE_INT |       \
1690                                        DDI_PROP_TYPE_STRING    |       \
1691                                        DDI_PROP_TYPE_BYTE      |       \
1692                                        DDI_PROP_TYPE_COMPOSITE)
1693DDI_RELATIVE_ADDRESSING = "relative-addressing"
1694DDI_GENERIC_ADDRESSING = "generic-addressing"
1695
1696# Included from sys/ddidevmap.h
1697KMEM_PAGEABLE = 0x100
1698KMEM_NON_PAGEABLE = 0x200
1699UMEM_LOCKED = 0x400
1700UMEM_TRASH = 0x800
1701DEVMAP_OPS_REV = 1
1702DEVMAP_DEFAULTS = 0x00
1703DEVMAP_MAPPING_INVALID = 0x01
1704DEVMAP_ALLOW_REMAP = 0x02
1705DEVMAP_USE_PAGESIZE = 0x04
1706DEVMAP_SETUP_FLAGS = \
1707        (DEVMAP_MAPPING_INVALID | DEVMAP_ALLOW_REMAP | DEVMAP_USE_PAGESIZE)
1708DEVMAP_SETUP_DONE = 0x100
1709DEVMAP_LOCK_INITED = 0x200
1710DEVMAP_FAULTING = 0x400
1711DEVMAP_LOCKED = 0x800
1712DEVMAP_FLAG_LARGE = 0x1000
1713DDI_UMEM_SLEEP = 0x0
1714DDI_UMEM_NOSLEEP = 0x01
1715DDI_UMEM_PAGEABLE = 0x02
1716DDI_UMEM_TRASH = 0x04
1717DDI_UMEMLOCK_READ = 0x01
1718DDI_UMEMLOCK_WRITE = 0x02
1719
1720# Included from sys/nexusdefs.h
1721
1722# Included from sys/nexusintr.h
1723BUSO_REV = 4
1724BUSO_REV_3 = 3
1725BUSO_REV_4 = 4
1726DEVO_REV = 3
1727CB_REV = 1
1728DDI_IDENTIFIED = (0)
1729DDI_NOT_IDENTIFIED = (-1)
1730DDI_PROBE_FAILURE = ENXIO
1731DDI_PROBE_DONTCARE = 0
1732DDI_PROBE_PARTIAL = 1
1733DDI_PROBE_SUCCESS = 2
1734MAPDEV_REV = 1
1735from TYPES import *
1736D_NEW = 0x00
1737_D_OLD = 0x01
1738D_TAPE = 0x08
1739D_MTSAFE = 0x0020
1740_D_QNEXTLESS = 0x0040
1741_D_MTOCSHARED = 0x0080
1742D_MTOCEXCL = 0x0800
1743D_MTPUTSHARED = 0x1000
1744D_MTPERQ = 0x2000
1745D_MTQPAIR = 0x4000
1746D_MTPERMOD = 0x6000
1747D_MTOUTPERIM = 0x8000
1748_D_MTCBSHARED = 0x10000
1749D_MTINNER_MOD = (D_MTPUTSHARED|_D_MTOCSHARED|_D_MTCBSHARED)
1750D_MTOUTER_MOD = (D_MTOCEXCL)
1751D_MP = D_MTSAFE
1752D_64BIT = 0x200
1753D_SYNCSTR = 0x400
1754D_DEVMAP = 0x100
1755D_HOTPLUG = 0x4
1756SNDZERO = 0x001
1757SNDPIPE = 0x002
1758RNORM = 0x000
1759RMSGD = 0x001
1760RMSGN = 0x002
1761RMODEMASK = 0x003
1762RPROTDAT = 0x004
1763RPROTDIS = 0x008
1764RPROTNORM = 0x010
1765RPROTMASK = 0x01c
1766RFLUSHMASK = 0x020
1767RFLUSHPCPROT = 0x020
1768RERRNORM = 0x001
1769RERRNONPERSIST = 0x002
1770RERRMASK = (RERRNORM|RERRNONPERSIST)
1771WERRNORM = 0x004
1772WERRNONPERSIST = 0x008
1773WERRMASK = (WERRNORM|WERRNONPERSIST)
1774FLUSHR = 0x01
1775FLUSHW = 0x02
1776FLUSHRW = 0x03
1777FLUSHBAND = 0x04
1778MAPINOK = 0x01
1779NOMAPIN = 0x02
1780REMAPOK = 0x04
1781NOREMAP = 0x08
1782S_INPUT = 0x0001
1783S_HIPRI = 0x0002
1784S_OUTPUT = 0x0004
1785S_MSG = 0x0008
1786S_ERROR = 0x0010
1787S_HANGUP = 0x0020
1788S_RDNORM = 0x0040
1789S_WRNORM = S_OUTPUT
1790S_RDBAND = 0x0080
1791S_WRBAND = 0x0100
1792S_BANDURG = 0x0200
1793RS_HIPRI = 0x01
1794STRUIO_POSTPONE = 0x08
1795STRUIO_MAPIN = 0x10
1796MSG_HIPRI = 0x01
1797MSG_ANY = 0x02
1798MSG_BAND = 0x04
1799MSG_XPG4 = 0x08
1800MSG_IPEEK = 0x10
1801MSG_DISCARDTAIL = 0x20
1802MSG_HOLDSIG = 0x40
1803MSG_IGNERROR = 0x80
1804MSG_DELAYERROR = 0x100
1805MSG_IGNFLOW = 0x200
1806MSG_NOMARK = 0x400
1807MORECTL = 1
1808MOREDATA = 2
1809MUXID_ALL = (-1)
1810ANYMARK = 0x01
1811LASTMARK = 0x02
1812_INFTIM = -1
1813INFTIM = _INFTIM