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