blob: b75ae4e5f8d5312cb7f146bcc28b79c2a0c63f28 [file] [log] [blame]
Barry Warsaw52845891997-12-02 04:49:09 +00001# Generated by h2py from /usr/include/sys/stropts.h
2
3# Included from sys/feature_tests.h
4_POSIX_C_SOURCE = 1
5_LARGEFILE64_SOURCE = 1
6_LARGEFILE_SOURCE = 1
7_FILE_OFFSET_BITS = 32
8_XOPEN_VERSION = 4
9_XOPEN_VERSION = 3
10
11# Included from sys/types.h
12
13# Included from sys/isa_defs.h
14_CHAR_ALIGNMENT = 1
15_SHORT_ALIGNMENT = 2
16_INT_ALIGNMENT = 4
17_LONG_ALIGNMENT = 4
18_LONG_LONG_ALIGNMENT = 4
19_DOUBLE_ALIGNMENT = 4
20_LONG_DOUBLE_ALIGNMENT = 4
21_POINTER_ALIGNMENT = 4
22_MAX_ALIGNMENT = 4
23_ALIGNMENT_REQUIRED = 0
24_CHAR_ALIGNMENT = 1
25_SHORT_ALIGNMENT = 2
26_INT_ALIGNMENT = 4
27_LONG_ALIGNMENT = 4
28_LONG_LONG_ALIGNMENT = 8
29_DOUBLE_ALIGNMENT = 8
30_LONG_DOUBLE_ALIGNMENT = 16
31_POINTER_ALIGNMENT = 4
32_MAX_ALIGNMENT = 16
33_ALIGNMENT_REQUIRED = 1
34_CHAR_ALIGNMENT = 1
35_SHORT_ALIGNMENT = 2
36_INT_ALIGNMENT = 4
37_LONG_LONG_ALIGNMENT = 8
38_DOUBLE_ALIGNMENT = 8
39_ALIGNMENT_REQUIRED = 1
40_LONG_ALIGNMENT = 4
41_LONG_DOUBLE_ALIGNMENT = 8
42_POINTER_ALIGNMENT = 4
43_MAX_ALIGNMENT = 8
44_LONG_ALIGNMENT = 8
45_LONG_DOUBLE_ALIGNMENT = 16
46_POINTER_ALIGNMENT = 8
47_MAX_ALIGNMENT = 16
48
49# Included from sys/machtypes.h
50
51# Included from sys/int_types.h
52SHRT_MIN = (-32768)
53SHRT_MAX = 32767
54USHRT_MAX = 65535
55INT_MIN = (-2147483647-1)
56INT_MAX = 2147483647
57LONG_MIN = (-9223372036854775807L-1L)
58LONG_MAX = 9223372036854775807L
59LONG_MIN = (-2147483647L-1L)
60LONG_MAX = 2147483647L
61P_MYID = (-1)
62
63# Included from sys/select.h
64
65# Included from sys/time.h
66DST_NONE = 0
67DST_USA = 1
68DST_AUST = 2
69DST_WET = 3
70DST_MET = 4
71DST_EET = 5
72DST_CAN = 6
73DST_GB = 7
74DST_RUM = 8
75DST_TUR = 9
76DST_AUSTALT = 10
77ITIMER_REAL = 0
78ITIMER_VIRTUAL = 1
79ITIMER_PROF = 2
80ITIMER_REALPROF = 3
81SEC = 1
82MILLISEC = 1000
83MICROSEC = 1000000
84NANOSEC = 1000000000
85__CLOCK_REALTIME0 = 0
86CLOCK_VIRTUAL = 1
87CLOCK_PROF = 2
88__CLOCK_REALTIME3 = 3
89CLOCK_REALTIME = __CLOCK_REALTIME3
90CLOCK_REALTIME = __CLOCK_REALTIME0
91TIMER_RELTIME = 0x0
92TIMER_ABSTIME = 0x1
93
94# Included from sys/mutex.h
95def MUTEX_HELD(x): return (mutex_owned(x))
96
97def TICK_TO_SEC(tick): return ((tick) / hz)
98
99def SEC_TO_TICK(sec): return ((sec) * hz)
100
101def TICK_TO_MSEC(tick): return \
102
103def MSEC_TO_TICK(msec): return \
104
105def MSEC_TO_TICK_ROUNDUP(msec): return \
106
107def TICK_TO_USEC(tick): return ((tick) * usec_per_tick)
108
109def USEC_TO_TICK(usec): return ((usec) / usec_per_tick)
110
111def USEC_TO_TICK_ROUNDUP(usec): return \
112
113def TICK_TO_NSEC(tick): return ((tick) * nsec_per_tick)
114
115def NSEC_TO_TICK(nsec): return ((nsec) / nsec_per_tick)
116
117def NSEC_TO_TICK_ROUNDUP(nsec): return \
118
119def TIMEVAL_TO_TICK(tvp): return \
120
121def TIMESTRUC_TO_TICK(tsp): return \
122
123
124# Included from time.h
125NULL = 0
126CLOCKS_PER_SEC = 1000000
127
128# Included from sys/siginfo.h
129SIGEV_NONE = 1
130SIGEV_SIGNAL = 2
131SIGEV_THREAD = 3
132SI_NOINFO = 32767
133SI_USER = 0
134SI_LWP = (-1)
135SI_QUEUE = (-2)
136SI_TIMER = (-3)
137SI_ASYNCIO = (-4)
138SI_MESGQ = (-5)
139
140# Included from sys/machsig.h
141ILL_ILLOPC = 1
142ILL_ILLOPN = 2
143ILL_ILLADR = 3
144ILL_ILLTRP = 4
145ILL_PRVOPC = 5
146ILL_PRVREG = 6
147ILL_COPROC = 7
148ILL_BADSTK = 8
149NSIGILL = 8
150EMT_TAGOVF = 1
151NSIGEMT = 1
152FPE_INTDIV = 1
153FPE_INTOVF = 2
154FPE_FLTDIV = 3
155FPE_FLTOVF = 4
156FPE_FLTUND = 5
157FPE_FLTRES = 6
158FPE_FLTINV = 7
159FPE_FLTSUB = 8
160NSIGFPE = 8
161SEGV_MAPERR = 1
162SEGV_ACCERR = 2
163NSIGSEGV = 2
164BUS_ADRALN = 1
165BUS_ADRERR = 2
166BUS_OBJERR = 3
167NSIGBUS = 3
168TRAP_BRKPT = 1
169TRAP_TRACE = 2
170TRAP_RWATCH = 3
171TRAP_WWATCH = 4
172TRAP_XWATCH = 5
173NSIGTRAP = 5
174CLD_EXITED = 1
175CLD_KILLED = 2
176CLD_DUMPED = 3
177CLD_TRAPPED = 4
178CLD_STOPPED = 5
179CLD_CONTINUED = 6
180NSIGCLD = 6
181POLL_IN = 1
182POLL_OUT = 2
183POLL_MSG = 3
184POLL_ERR = 4
185POLL_PRI = 5
186POLL_HUP = 6
187NSIGPOLL = 6
188PROF_SIG = 1
189NSIGPROF = 1
190SI_MAXSZ = 128
191def SI_CANQUEUE(c): return ((c) <= SI_QUEUE)
192
193FD_SETSIZE = 1024
194_NBBY = 8
195NBBY = _NBBY
196
197# Included from sys/conf.h
198
199# Included from sys/t_lock.h
200
201# Included from sys/machlock.h
202LOCK_HELD_VALUE = 0xff
203def SPIN_LOCK(pl): return ((pl) > ipltospl(LOCK_LEVEL))
204
205def LOCK_SAMPLE_INTERVAL(i): return (((i) & 0xff) == 0)
206
207LOCK_LEVEL = 10
208CLOCK_LEVEL = 10
209PTR24_LSB = 5
210PTR24_MSB = (PTR24_LSB + 24)
211PTR24_ALIGN = 32
212PTR24_BASE = 0xe0000000
213
214# Included from sys/sleepq.h
215NSLEEPQ = 512
216
217# Included from sys/turnstile.h
218
219# Included from sys/param.h
220_POSIX_VDISABLE = 0
221MAX_INPUT = 512
222MAX_CANON = 256
223UID_NOBODY = 60001
224GID_NOBODY = UID_NOBODY
225UID_NOACCESS = 60002
226MAXPID = 30000
227MAXUID = 2147483647
228MAXLINK = 32767
229NMOUNT = 40
230CANBSIZ = 256
231NOFILE = 20
232NGROUPS_UMIN = 0
233NGROUPS_UMAX = 32
234NGROUPS_MAX_DEFAULT = 16
235PMASK = 0177
236PCATCH = 0400
237PNOSTOP = 01000
238PSWP = 0
239PINOD = 10
240PSNDD = PINOD
241PAMAP = PINOD
242PPMAP = PAMAP
243PRIBIO = 20
244PZERO = 25
245PMEM = 0
246NZERO = 20
247PPIPE = 26
248PVFS = 27
249PWAIT = 30
250PLOCK = 35
251PSLEP = 39
252PUSER = 60
253PIDLE = 127
254NULL = 0
255CMASK = 0
256CDLIMIT = (1L<<11)
257NBPS = 0x20000
258NBPSCTR = 512
259UBSIZE = 512
260SCTRSHFT = 9
261SYSNAME = 9
262PREMOTE = 39
263MAXPATHLEN = 1024
264MAXSYMLINKS = 20
265MAXNAMELEN = 256
266NADDR = 13
267PIPE_BUF = 5120
268PIPE_MAX = 5120
269NBBY = 8
270MAXBSIZE = 8192
271DEV_BSIZE = 512
272DEV_BSHIFT = 9
273MAXFRAG = 8
274MAXOFF_T = 0x7fffffff
275MAXOFFSET_T = MAXOFF_T
276def btodb(bytes): return \
277
278def dbtob(db): return \
279
280def lbtodb(bytes): return \
281
282def ldbtob(db): return \
283
284NCARGS = 0x100000
285FSHIFT = 8
286FSCALE = (1<<FSHIFT)
287def DELAY(n): return drv_usecwait(n)
288
289def mmu_ptob(x): return ((x) << MMU_PAGESHIFT)
290
291def mmu_btop(x): return (((x)) >> MMU_PAGESHIFT)
292
293def mmu_btopr(x): return ((((x) + MMU_PAGEOFFSET) >> MMU_PAGESHIFT))
294
295def mmu_ptod(x): return ((x) << (MMU_PAGESHIFT - DEV_BSHIFT))
296
297def ptod(x): return ((x) << (PAGESHIFT - DEV_BSHIFT))
298
299def ptob(x): return ((x) << PAGESHIFT)
300
301def btop(x): return ((u_int)((x) >> PAGESHIFT))
302
303def btopr(x): return ((u_int)(((x) + PAGEOFFSET) >> PAGESHIFT))
304
305def dtop(DD): return (((DD) + NDPP - 1) >> (PAGESHIFT - DEV_BSHIFT))
306
307def dtopt(DD): return ((DD) >> (PAGESHIFT - DEV_BSHIFT))
308
309def PAGOFF(x): return (((uint)(x)) & PAGEOFFSET)
310
311_AIO_LISTIO_MAX = (256)
312_AIO_MAX = (-1)
313_AIO_PRIO_DELTA_MAX = (-1)
314_MQ_OPEN_MAX = (32)
315_MQ_PRIO_MAX = (32)
316_SEM_NSEMS_MAX = INT_MAX
317_SEM_VALUE_MAX = INT_MAX
318
319# Included from sys/unistd.h
320_SC_ARG_MAX = 1
321_SC_CHILD_MAX = 2
322_SC_CLK_TCK = 3
323_SC_NGROUPS_MAX = 4
324_SC_OPEN_MAX = 5
325_SC_JOB_CONTROL = 6
326_SC_SAVED_IDS = 7
327_SC_VERSION = 8
328_SC_PASS_MAX = 9
329_SC_LOGNAME_MAX = 10
330_SC_PAGESIZE = 11
331_SC_XOPEN_VERSION = 12
332_SC_NPROCESSORS_CONF = 14
333_SC_NPROCESSORS_ONLN = 15
334_SC_STREAM_MAX = 16
335_SC_TZNAME_MAX = 17
336_SC_AIO_LISTIO_MAX = 18
337_SC_AIO_MAX = 19
338_SC_AIO_PRIO_DELTA_MAX = 20
339_SC_ASYNCHRONOUS_IO = 21
340_SC_DELAYTIMER_MAX = 22
341_SC_FSYNC = 23
342_SC_MAPPED_FILES = 24
343_SC_MEMLOCK = 25
344_SC_MEMLOCK_RANGE = 26
345_SC_MEMORY_PROTECTION = 27
346_SC_MESSAGE_PASSING = 28
347_SC_MQ_OPEN_MAX = 29
348_SC_MQ_PRIO_MAX = 30
349_SC_PRIORITIZED_IO = 31
350_SC_PRIORITY_SCHEDULING = 32
351_SC_REALTIME_SIGNALS = 33
352_SC_RTSIG_MAX = 34
353_SC_SEMAPHORES = 35
354_SC_SEM_NSEMS_MAX = 36
355_SC_SEM_VALUE_MAX = 37
356_SC_SHARED_MEMORY_OBJECTS = 38
357_SC_SIGQUEUE_MAX = 39
358_SC_SIGRT_MIN = 40
359_SC_SIGRT_MAX = 41
360_SC_SYNCHRONIZED_IO = 42
361_SC_TIMERS = 43
362_SC_TIMER_MAX = 44
363_SC_2_C_BIND = 45
364_SC_2_C_DEV = 46
365_SC_2_C_VERSION = 47
366_SC_2_FORT_DEV = 48
367_SC_2_FORT_RUN = 49
368_SC_2_LOCALEDEF = 50
369_SC_2_SW_DEV = 51
370_SC_2_UPE = 52
371_SC_2_VERSION = 53
372_SC_BC_BASE_MAX = 54
373_SC_BC_DIM_MAX = 55
374_SC_BC_SCALE_MAX = 56
375_SC_BC_STRING_MAX = 57
376_SC_COLL_WEIGHTS_MAX = 58
377_SC_EXPR_NEST_MAX = 59
378_SC_LINE_MAX = 60
379_SC_RE_DUP_MAX = 61
380_SC_XOPEN_CRYPT = 62
381_SC_XOPEN_ENH_I18N = 63
382_SC_XOPEN_SHM = 64
383_CS_PATH = 65
384_SC_2_CHAR_TERM = 66
385_SC_XOPEN_XCU_VERSION = 67
386_CS_LFS_CFLAGS = 68
387_CS_LFS_LDFLAGS = 69
388_CS_LFS_LIBS = 70
389_CS_LFS_LINTFLAGS = 71
390_CS_LFS64_CFLAGS = 72
391_CS_LFS64_LDFLAGS = 73
392_CS_LFS64_LIBS = 74
393_CS_LFS64_LINTFLAGS = 75
394_SC_ATEXIT_MAX = 76
395_SC_IOV_MAX = 77
396_SC_XOPEN_UNIX = 78
397_SC_PAGE_SIZE = _SC_PAGESIZE
398_SC_PHYS_PAGES = 500
399_SC_AVPHYS_PAGES = 501
400_SC_COHER_BLKSZ = 503
401_SC_SPLIT_CACHE = 504
402_SC_ICACHE_SZ = 505
403_SC_DCACHE_SZ = 506
404_SC_ICACHE_LINESZ = 507
405_SC_DCACHE_LINESZ = 508
406_SC_ICACHE_BLKSZ = 509
407_SC_DCACHE_BLKSZ = 510
408_SC_DCACHE_TBLKSZ = 511
409_SC_ICACHE_ASSOC = 512
410_SC_DCACHE_ASSOC = 513
411_SC_THREAD_DESTRUCTOR_ITERATIONS = 568
412_SC_GETGR_R_SIZE_MAX = 569
413_SC_GETPW_R_SIZE_MAX = 570
414_SC_LOGIN_NAME_MAX = 571
415_SC_THREAD_KEYS_MAX = 572
416_SC_THREAD_STACK_MIN = 573
417_SC_THREAD_THREADS_MAX = 574
418_SC_TTY_NAME_MAX = 575
419_SC_THREADS = 576
420_SC_THREAD_ATTR_STACKADDR = 577
421_SC_THREAD_ATTR_STACKSIZE = 578
422_SC_THREAD_PRIORITY_SCHEDULING = 579
423_SC_THREAD_PRIO_INHERIT = 580
424_SC_THREAD_PRIO_PROTECT = 581
425_SC_THREAD_PROCESS_SHARED = 582
426_SC_THREAD_SAFE_FUNCTIONS = 583
427_SC_PPC_GRANULE_SZ = 601
428_SC_PPC_TB_TICKSPSECH = 602
429_SC_PPC_TB_TICKSPSECL = 603
430_PC_LINK_MAX = 1
431_PC_MAX_CANON = 2
432_PC_MAX_INPUT = 3
433_PC_NAME_MAX = 4
434_PC_PATH_MAX = 5
435_PC_PIPE_BUF = 6
436_PC_NO_TRUNC = 7
437_PC_VDISABLE = 8
438_PC_CHOWN_RESTRICTED = 9
439_PC_ASYNC_IO = 10
440_PC_PRIO_IO = 11
441_PC_SYNC_IO = 12
442_PC_FILESIZEBITS = 67
443_PC_LAST = 67
444_POSIX_VERSION = 199506L
445_POSIX2_VERSION = 199209L
446_POSIX2_C_VERSION = 199209L
447_XOPEN_XCU_VERSION = 4
448_POSIX2_C_BIND = 1
449_POSIX2_CHAR_TERM = 1
450_POSIX2_LOCALEDEF = 1
451_POSIX2_C_DEV = 1
452_POSIX2_SW_DEV = 1
453_POSIX2_UPE = 1
454
455# Included from sys/pirec.h
456NTSTILE_SQ = 2
457TSTILE_FREE = 0
458TSTILE_ACTIVE = 1
459TS_ROWSZ = 512
460TS_COLSZ = 128
461TS_ROWBITS = 9
462TS_COLBITS = 7
463TS_ROWMASK = ((1 << TS_ROWBITS) - 1)
464def TS_COL(ts_id): return ((ts_id) >> TS_ROWBITS)
465
466def TS_ROW(ts_id): return ((ts_id) & TS_ROWMASK)
467
468def TSTILE_PRIO_INVERTED(ts): return \
469
470
471# Included from sys/rwlock.h
472def RW_READ_HELD(x): return (rw_read_held((x)))
473
474def RW_WRITE_HELD(x): return (rw_write_held((x)))
475
476def RW_LOCK_HELD(x): return (rw_lock_held((x)))
477
478def RW_ISWRITER(x): return (rw_iswriter(x))
479
480
481# Included from sys/semaphore.h
482
483# Included from sys/thread.h
484
485# Included from sys/condvar.h
486
487# Included from sys/klwp.h
488
489# Included from sys/signal.h
490SIGHUP = 1
491SIGINT = 2
492SIGQUIT = 3
493SIGILL = 4
494SIGTRAP = 5
495SIGIOT = 6
496SIGABRT = 6
497SIGEMT = 7
498SIGFPE = 8
499SIGKILL = 9
500SIGBUS = 10
501SIGSEGV = 11
502SIGSYS = 12
503SIGPIPE = 13
504SIGALRM = 14
505SIGTERM = 15
506SIGUSR1 = 16
507SIGUSR2 = 17
508SIGCLD = 18
509SIGCHLD = 18
510SIGPWR = 19
511SIGWINCH = 20
512SIGURG = 21
513SIGPOLL = 22
514SIGIO = SIGPOLL
515SIGSTOP = 23
516SIGTSTP = 24
517SIGCONT = 25
518SIGTTIN = 26
519SIGTTOU = 27
520SIGVTALRM = 28
521SIGPROF = 29
522SIGXCPU = 30
523SIGXFSZ = 31
524SIGWAITING = 32
525SIGLWP = 33
526SIGFREEZE = 34
527SIGTHAW = 35
528SIGCANCEL = 36
529SIGLOST = 37
530_SIGRTMIN = 38
531_SIGRTMAX = 45
532SIG_BLOCK = 1
533SIG_UNBLOCK = 2
534SIG_SETMASK = 3
535SIGNO_MASK = 0xFF
536SIGDEFER = 0x100
537SIGHOLD = 0x200
538SIGRELSE = 0x400
539SIGIGNORE = 0x800
540SIGPAUSE = 0x1000
541SA_NOCLDSTOP = 0x00020000
542SA_ONSTACK = 0x00000001
543SA_RESETHAND = 0x00000002
544SA_RESTART = 0x00000004
545SA_SIGINFO = 0x00000008
546SA_NODEFER = 0x00000010
547SA_NOCLDWAIT = 0x00010000
548SA_WAITSIG = 0x00010000
549NSIG = 46
550MAXSIG = 45
551S_SIGNAL = 1
552S_SIGSET = 2
553S_SIGACTION = 3
554S_NONE = 4
555MINSIGSTKSZ = 2048
556SIGSTKSZ = 8192
557SS_ONSTACK = 0x00000001
558SS_DISABLE = 0x00000002
559SN_PROC = 1
560SN_CANCEL = 2
561SN_SEND = 3
562
563# Included from sys/ucontext.h
564
565# Included from sys/regset.h
566REG_PSR = (0)
567REG_PC = (1)
568REG_nPC = (2)
569REG_Y = (3)
570REG_G1 = (4)
571REG_G2 = (5)
572REG_G3 = (6)
573REG_G4 = (7)
574REG_G5 = (8)
575REG_G6 = (9)
576REG_G7 = (10)
577REG_O0 = (11)
578REG_O1 = (12)
579REG_O2 = (13)
580REG_O3 = (14)
581REG_O4 = (15)
582REG_O5 = (16)
583REG_O6 = (17)
584REG_O7 = (18)
585REG_PS = REG_PSR
586REG_SP = REG_O6
587REG_R0 = REG_O0
588REG_R1 = REG_O1
589_NGREG = 19
590NGREG = _NGREG
591SPARC_MAXREGWINDOW = 31
592MAXFPQ = 16
593XRS_ID = 0x78727300
594
595# Included from v7/sys/privregs.h
596
597# Included from v7/sys/psr.h
598PSR_CWP = 0x0000001F
599PSR_ET = 0x00000020
600PSR_PS = 0x00000040
601PSR_S = 0x00000080
602PSR_PIL = 0x00000F00
603PSR_EF = 0x00001000
604PSR_EC = 0x00002000
605PSR_RSV = 0x000FC000
606PSR_ICC = 0x00F00000
607PSR_C = 0x00100000
608PSR_V = 0x00200000
609PSR_Z = 0x00400000
610PSR_N = 0x00800000
611PSR_VER = 0x0F000000
612PSR_IMPL = 0xF0000000
613PSL_ALLCC = PSR_ICC
614PSL_USER = (PSR_S)
615PSL_USERMASK = (PSR_ICC)
616PSL_UBITS = (PSR_ICC|PSR_EF)
617def USERMODE(ps): return (((ps) & PSR_PS) == 0)
618
619
620# Included from sys/fsr.h
621FSR_CEXC = 0x0000001f
622FSR_AEXC = 0x000003e0
623FSR_FCC = 0x00000c00
624FSR_PR = 0x00001000
625FSR_QNE = 0x00002000
626FSR_FTT = 0x0001c000
627FSR_VER = 0x000e0000
628FSR_TEM = 0x0f800000
629FSR_RP = 0x30000000
630FSR_RD = 0xc0000000
631FSR_VER_SHIFT = 17
632FSR_FCC1 = 0x00000003
633FSR_FCC2 = 0x0000000C
634FSR_FCC3 = 0x00000030
635FSR_CEXC_NX = 0x00000001
636FSR_CEXC_DZ = 0x00000002
637FSR_CEXC_UF = 0x00000004
638FSR_CEXC_OF = 0x00000008
639FSR_CEXC_NV = 0x00000010
640FSR_AEXC_NX = (0x1 << 5)
641FSR_AEXC_DZ = (0x2 << 5)
642FSR_AEXC_UF = (0x4 << 5)
643FSR_AEXC_OF = (0x8 << 5)
644FSR_AEXC_NV = (0x10 << 5)
645FTT_NONE = 0
646FTT_IEEE = 1
647FTT_UNFIN = 2
648FTT_UNIMP = 3
649FTT_SEQ = 4
650FTT_ALIGN = 5
651FTT_DFAULT = 6
652FSR_FTT_SHIFT = 14
653FSR_FTT_IEEE = (FTT_IEEE << FSR_FTT_SHIFT)
654FSR_FTT_UNFIN = (FTT_UNFIN << FSR_FTT_SHIFT)
655FSR_FTT_UNIMP = (FTT_UNIMP << FSR_FTT_SHIFT)
656FSR_FTT_SEQ = (FTT_SEQ << FSR_FTT_SHIFT)
657FSR_FTT_ALIGN = (FTT_ALIGN << FSR_FTT_SHIFT)
658FSR_FTT_DFAULT = (FTT_DFAULT << FSR_FTT_SHIFT)
659FSR_TEM_NX = (0x1 << 23)
660FSR_TEM_DZ = (0x2 << 23)
661FSR_TEM_UF = (0x4 << 23)
662FSR_TEM_OF = (0x8 << 23)
663FSR_TEM_NV = (0x10 << 23)
664RP_DBLEXT = 0
665RP_SINGLE = 1
666RP_DOUBLE = 2
667RP_RESERVED = 3
668RD_NEAR = 0
669RD_ZER0 = 1
670RD_POSINF = 2
671RD_NEGINF = 3
672FPRS_DL = 0x1
673FPRS_DU = 0x2
674FPRS_FEF = 0x4
675def SAVE_GLOBALS(RP): return \
676
677def RESTORE_GLOBALS(RP): return \
678
679def SAVE_OUTS(RP): return \
680
681def RESTORE_OUTS(RP): return \
682
683def SAVE_WINDOW(SBP): return \
684
685def RESTORE_WINDOW(SBP): return \
686
687def STORE_FPREGS(FP): return \
688
689def LOAD_FPREGS(FP): return \
690
691_SPARC_MAXREGWINDOW = 31
692_XRS_ID = 0x78727300
693GETCONTEXT = 0
694SETCONTEXT = 1
695UC_SIGMASK = 001
696UC_STACK = 002
697UC_CPU = 004
698UC_MAU = 010
699UC_FPU = UC_MAU
700UC_INTR = 020
701UC_MCONTEXT = (UC_CPU|UC_FPU)
702UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT)
703_SIGQUEUE_MAX = 32
704_SIGNOTIFY_MAX = 32
705
706# Included from sys/pcb.h
707INSTR_VALID = 0x02
708NORMAL_STEP = 0x04
709WATCH_STEP = 0x08
710
711# Included from sys/msacct.h
712LMS_USER = 0
713LMS_SYSTEM = 1
714LMS_TRAP = 2
715LMS_TFAULT = 3
716LMS_DFAULT = 4
717LMS_KFAULT = 5
718LMS_USER_LOCK = 6
719LMS_SLEEP = 7
720LMS_WAIT_CPU = 8
721LMS_STOPPED = 9
722NMSTATES = 10
723
724# Included from sys/lwp.h
725
726# Included from sys/synch.h
727USYNC_THREAD = 0
728USYNC_PROCESS = 1
729TRACE_TYPE = 2
730LWP_DETACHED = 0x00000040
731LWP_SUSPENDED = 0x00000080
732__LWP_ASLWP = 0x00000100
733MAXSYSARGS = 8
734NORMALRETURN = 0
735JUSTRETURN = 1
736LWP_USER = 0x01
737LWP_SYS = 0x02
738
739# Included from vm/page.h
740PAGE_HASHAVELEN = 4
741PAGE_HASHVPSHIFT = 6
742PG_EXCL = 0x0001
743PG_WAIT = 0x0002
744PG_PHYSCONTIG = 0x0004
745PG_MATCH_COLOR = 0x0008
746PG_FREE_LIST = 1
747PG_CACHE_LIST = 2
748PG_LIST_TAIL = 0
749PG_LIST_HEAD = 1
750PAGE_IO_INUSE = 0x1
751PAGE_IO_WANTED = 0x2
752P_FREE = 0x80
753def PP_SETAGED(pp): return ASSERT(PP_ISAGED(pp))
754
755TS_FREE = 0x00
756TS_SLEEP = 0x01
757TS_RUN = 0x02
758TS_ONPROC = 0x04
759TS_ZOMB = 0x08
760TS_STOPPED = 0x10
761T_INTR_THREAD = 0x0001
762T_WAKEABLE = 0x0002
763T_TOMASK = 0x0004
764T_TALLOCSTK = 0x0008
765T_LWPZOMB = 0x0010
766T_WOULDBLOCK = 0x0020
767T_DONTBLOCK = 0x0040
768T_DONTPEND = 0x0080
769T_SYS_PROF = 0x0100
770T_WAITCVSEM = 0x0200
771T_WATCHPT = 0x0400
772TP_WAITFOR = 0x001
773TP_HOLDLWP = 0x002
774TP_TWAIT = 0x004
775TP_LWPEXIT = 0x008
776TP_PRSTOP = 0x010
777TP_CHKPT = 0x020
778TP_EXITLWP = 0x040
779TP_PRVSTOP = 0x080
780TP_MSACCT = 0x100
781TP_STOPPING = 0x200
782TP_WATCHPT = 0x400
783TP_PAUSE = 0x800
784TS_LOAD = 0x0001
785TS_DONT_SWAP = 0x0002
786TS_SWAPENQ = 0x0004
787TS_ON_SWAPQ = 0x0008
788TS_CSTART = 0x0100
789TS_UNPAUSE = 0x0200
790TS_XSTART = 0x0400
791TS_PSTART = 0x0800
792TS_RESUME = 0x1000
793TS_ALLSTART = (TS_CSTART|TS_UNPAUSE|TS_XSTART|TS_PSTART|TS_RESUME)
794def CPR_VSTOPPED(t): return \
795
796def THREAD_TRANSITION(tp): return thread_transition(tp);
797
798def THREAD_STOP(tp): return \
799
800def THREAD_ZOMB(tp): return THREAD_SET_STATE(tp, TS_ZOMB, NULL)
801
802def SEMA_HELD(x): return (sema_held((x)))
803
804NO_LOCKS_HELD = 1
805NO_COMPETING_THREADS = 1
806FMNAMESZ = 8
807
808# Included from sys/systm.h
809
810# Included from sys/varargs.h
811
812# Included from sys/va_list.h
813def va_start(list): return __builtin_va_info(list)
814
815NSYSCALL = 250
816SE_LOADABLE = 0x08
817SE_LOADED = 0x10
818SE_NOUNLOAD = 0x20
819SE_ARGC = 0x40
820NUMRC = 512
821NUMPHASE = 64
822PFCHAR = 10
823KPFCHILDSLP = 35
824KPFTRON = 36
825KPFTRON2 = 37
826KPFTROFF = 38
827KPT_SYSCALL = 0
828KPT_INTR = 1
829KPT_TRAP_RET = 2
830KPT_INT_KRET = 3
831KPT_INT_URET = 4
832KPT_SLEEP = 5
833KPT_WAKEUP = 6
834KPT_PSWTCH = 7
835KPT_SPL = 8
836KPT_CSERVE = 9
837KPT_RSERVE = 10
838KPT_UXMEMF = 11
839KPT_SWTCH = 12
840KPT_QSWTCH = 13
841KPT_STKBX = 14
842KPT_END = 15
843KPT_IDLE = 16
844KPT_PREEMPT = 17
845KPT_P_QSWTCH = 18
846KPT_LAST = 19
847
848# Included from sys/devops.h
849
850# Included from sys/cred.h
851
852# Included from sys/uio.h
853
854# Included from sys/buf.h
855
856# Included from sys/kstat.h
857KSTAT_IOC_BASE = (ord('K') << 8)
858KSTAT_IOC_CHAIN_ID = KSTAT_IOC_BASE | 0x01
859KSTAT_IOC_READ = KSTAT_IOC_BASE | 0x02
860KSTAT_IOC_WRITE = KSTAT_IOC_BASE | 0x03
861KSTAT_STRLEN = 31
862def KSTAT_ENTER(k): return \
863
864def KSTAT_EXIT(k): return \
865
866KSTAT_TYPE_RAW = 0
867KSTAT_TYPE_NAMED = 1
868KSTAT_TYPE_INTR = 2
869KSTAT_TYPE_IO = 3
870KSTAT_TYPE_TIMER = 4
871KSTAT_NUM_TYPES = 5
872KSTAT_FLAG_VIRTUAL = 0x01
873KSTAT_FLAG_VAR_SIZE = 0x02
874KSTAT_FLAG_WRITABLE = 0x04
875KSTAT_FLAG_PERSISTENT = 0x08
876KSTAT_FLAG_DORMANT = 0x10
877KSTAT_FLAG_INVALID = 0x20
878KSTAT_READ = 0
879KSTAT_WRITE = 1
880KSTAT_DATA_CHAR = 0
881KSTAT_DATA_INT32 = 1
882KSTAT_DATA_UINT32 = 2
883KSTAT_DATA_INT64 = 3
884KSTAT_DATA_UINT64 = 4
885KSTAT_DATA_LONG = 1
886KSTAT_DATA_ULONG = 2
887KSTAT_DATA_LONGLONG = 3
888KSTAT_DATA_ULONGLONG = 4
889KSTAT_DATA_FLOAT = 5
890KSTAT_DATA_DOUBLE = 6
891KSTAT_INTR_HARD = 0
892KSTAT_INTR_SOFT = 1
893KSTAT_INTR_WATCHDOG = 2
894KSTAT_INTR_SPURIOUS = 3
895KSTAT_INTR_MULTSVC = 4
896KSTAT_NUM_INTRS = 5
897B_BUSY = 0x0001
898B_DONE = 0x0002
899B_ERROR = 0x0004
900B_PAGEIO = 0x0010
901B_PHYS = 0x0020
902B_READ = 0x0040
903B_WRITE = 0x0100
904B_KERNBUF = 0x0008
905B_WANTED = 0x0080
906B_AGE = 0x000200
907B_ASYNC = 0x000400
908B_DELWRI = 0x000800
909B_STALE = 0x001000
910B_DONTNEED = 0x002000
911B_REMAPPED = 0x004000
912B_FREE = 0x008000
913B_INVAL = 0x010000
914B_FORCE = 0x020000
915B_HEAD = 0x040000
916B_NOCACHE = 0x080000
917B_TRUNC = 0x100000
918B_SHADOW = 0x200000
919def notavail(bp): return \
920
921
922# Included from sys/poll.h
923POLLIN = 0x0001
924POLLPRI = 0x0002
925POLLOUT = 0x0004
926POLLRDNORM = 0x0040
927POLLWRNORM = POLLOUT
928POLLRDBAND = 0x0080
929POLLWRBAND = 0x0100
930POLLNORM = POLLRDNORM
931POLLERR = 0x0008
932POLLHUP = 0x0010
933POLLNVAL = 0x0020
934POLLRDDATA = 0x200
935POLLNOERR = 0x400
936T_POLLTIME = 0x01
937T_POLLWAKE = 0x02
938
939# Included from vm/as.h
940
941# Included from sys/watchpoint.h
942
943# Included from vm/seg_enum.h
944
945# Included from sys/copyops.h
946WP_NOWATCH = 0x01
947WP_SETPROT = 0x02
948
949# Included from vm/seg.h
950
951# Included from sys/vnode.h
952
953# Included from sys/resource.h
954PRIO_PROCESS = 0
955PRIO_PGRP = 1
956PRIO_USER = 2
957RLIMIT_CPU = 0
958RLIMIT_FSIZE = 1
959RLIMIT_DATA = 2
960RLIMIT_STACK = 3
961RLIMIT_CORE = 4
962RLIMIT_NOFILE = 5
963RLIMIT_VMEM = 6
964RLIMIT_AS = RLIMIT_VMEM
965RLIM_NLIMITS = 7
966RLIM_INFINITY = 0x7fffffff
967RLIM_SAVED_MAX = 0x7ffffffe
968RLIM_SAVED_CUR = 0x7ffffffd
969RUSAGE_SELF = 0
970RUSAGE_CHILDREN = -1
971VROOT = 0x01
972VNOCACHE = 0x02
973VNOMAP = 0x04
974VDUP = 0x08
975VNOSWAP = 0x10
976VNOMOUNT = 0x20
977VISSWAP = 0x40
978VSWAPLIKE = 0x80
979VVFSLOCK = 0x100
980VVFSWAIT = 0x200
981VVMLOCK = 0x400
982VDIROPEN = 0x800
983AT_TYPE = 0x0001
984AT_MODE = 0x0002
985AT_UID = 0x0004
986AT_GID = 0x0008
987AT_FSID = 0x0010
988AT_NODEID = 0x0020
989AT_NLINK = 0x0040
990AT_SIZE = 0x0080
991AT_ATIME = 0x0100
992AT_MTIME = 0x0200
993AT_CTIME = 0x0400
994AT_RDEV = 0x0800
995AT_BLKSIZE = 0x1000
996AT_NBLOCKS = 0x2000
997AT_VCODE = 0x4000
998AT_ALL = (AT_TYPE|AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|\
999 AT_NLINK|AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|\
1000 AT_RDEV|AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1001AT_STAT = (AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|AT_NLINK|\
1002 AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|AT_RDEV)
1003AT_TIMES = (AT_ATIME|AT_MTIME|AT_CTIME)
1004AT_NOSET = (AT_NLINK|AT_RDEV|AT_FSID|AT_NODEID|AT_TYPE|\
1005 AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1006VSUID = 04000
1007VSGID = 02000
1008VSVTX = 01000
1009VREAD = 00400
1010VWRITE = 00200
1011VEXEC = 00100
1012MODEMASK = 07777
1013PERMMASK = 00777
1014def MANDMODE(mode): return (((mode) & (VSGID|(VEXEC>>3))) == VSGID)
1015
1016VSA_ACL = 0x0001
1017VSA_ACLCNT = 0x0002
1018VSA_DFACL = 0x0004
1019VSA_DFACLCNT = 0x0008
1020LOOKUP_DIR = 0x01
1021ATTR_UTIME = 0x01
1022ATTR_EXEC = 0x02
1023ATTR_COMM = 0x04
1024ATTR_HINT = 0x08
1025ATTR_REAL = 0x10
1026
1027# Included from vm/faultcode.h
1028FC_HWERR = 0x1
1029FC_ALIGN = 0x2
1030FC_OBJERR = 0x3
1031FC_PROT = 0x4
1032FC_NOMAP = 0x5
1033FC_NOSUPPORT = 0x6
1034def FC_MAKE_ERR(e): return (((e) << 8) | FC_OBJERR)
1035
1036def FC_CODE(fc): return ((fc) & 0xff)
1037
1038def FC_ERRNO(fc): return ((unsigned)(fc) >> 8)
1039
1040
1041# Included from vm/hat.h
1042HAT_FLAGS_RESV = 0xFF000000
1043HAT_LOAD = 0x00
1044HAT_LOAD_LOCK = 0x01
1045HAT_LOAD_ADV = 0x04
1046HAT_LOAD_CONTIG = 0x10
1047HAT_LOAD_NOCONSIST = 0x20
1048HAT_LOAD_SHARE = 0x40
1049HAT_LOAD_REMAP = 0x80
1050HAT_PLAT_ATTR_MASK = 0xF00000
1051HAT_PROT_MASK = 0x0F
1052HAT_NOFAULT = 0x10
1053HAT_NOSYNC = 0x20
1054HAT_STRICTORDER = 0x0000
1055HAT_UNORDERED_OK = 0x0100
1056HAT_MERGING_OK = 0x0200
1057HAT_LOADCACHING_OK = 0x0300
1058HAT_STORECACHING_OK = 0x0400
1059HAT_ORDER_MASK = 0x0700
1060HAT_NEVERSWAP = 0x0000
1061HAT_STRUCTURE_BE = 0x1000
1062HAT_STRUCTURE_LE = 0x2000
1063HAT_ENDIAN_MASK = 0x3000
1064HAT_KMEM = 0x10000
1065HAT_COW = 0x0001
1066HAT_UNLOAD = 0x00
1067HAT_UNLOAD_NOSYNC = 0x02
1068HAT_UNLOAD_UNLOCK = 0x04
1069HAT_UNLOAD_OTHER = 0x08
1070HAT_UNLOAD_UNMAP = 0x10
1071HAT_SYNC_DONTZERO = 0x00
1072HAT_SYNC_ZERORM = 0x01
1073HAT_SYNC_STOPON_REF = 0x02
1074HAT_SYNC_STOPON_MOD = 0x04
1075HAT_SYNC_STOPON_RM = (HAT_SYNC_STOPON_REF | HAT_SYNC_STOPON_MOD)
1076HAT_DUP_ALL = 1
1077HAT_DUP_COW = 2
1078HAT_MAP = 0x00
1079HAT_ADV_PGUNLOAD = 0x00
1080HAT_FORCE_PGUNLOAD = 0x01
1081P_MOD = 0x1
1082P_REF = 0x2
1083P_RO = 0x4
1084def hat_ismod(pp): return (hat_page_getattr(pp, P_MOD))
1085
1086def hat_isref(pp): return (hat_page_getattr(pp, P_REF))
1087
1088def hat_isro(pp): return (hat_page_getattr(pp, P_RO))
1089
1090def hat_setmod(pp): return (hat_page_setattr(pp, P_MOD))
1091
1092def hat_setref(pp): return (hat_page_setattr(pp, P_REF))
1093
1094def hat_setrefmod(pp): return (hat_page_setattr(pp, P_REF|P_MOD))
1095
1096def hat_clrmod(pp): return (hat_page_clrattr(pp, P_MOD))
1097
1098def hat_clrref(pp): return (hat_page_clrattr(pp, P_REF))
1099
1100def hat_clrrefmod(pp): return (hat_page_clrattr(pp, P_REF|P_MOD))
1101
1102def hat_page_is_mapped(pp): return (hat_page_getshare(pp))
1103
1104HAT_DONTALLOC = 0
1105HAT_ALLOC = 1
1106HRM_SHIFT = 4
1107HRM_BYTES = (1 << HRM_SHIFT)
1108HRM_PAGES = ((HRM_BYTES * NBBY) / 2)
1109HRM_PGPERBYTE = (NBBY/2)
1110HRM_PGBYTEMASK = (HRM_PGPERBYTE-1)
1111HRM_HASHSIZE = 0x200
1112HRM_HASHMASK = (HRM_HASHSIZE - 1)
1113HRM_BLIST_INCR = 0x200
1114HRM_SWSMONID = 1
1115SSL_NLEVELS = 4
1116SSL_BFACTOR = 4
1117SSL_LOG2BF = 2
1118def seg_pages(seg): return \
1119
1120AS_PAGLCK = 0x80
1121AS_CLAIMGAP = 0x40
1122AS_UNMAPWAIT = 0x20
1123AS_LREP_LINKEDLIST = 0
1124AS_LREP_SKIPLIST = 1
1125AS_MUTATION_THRESH = 225
1126AH_DIR = 0x1
1127AH_LO = 0x0
1128AH_HI = 0x1
1129AH_CONTAIN = 0x2
1130
1131# Included from sys/dditypes.h
1132DDI_DEVICE_ATTR_V0 = 0x0001
1133DDI_NEVERSWAP_ACC = 0x00
1134DDI_STRUCTURE_LE_ACC = 0x01
1135DDI_STRUCTURE_BE_ACC = 0x02
1136DDI_STRICTORDER_ACC = 0x00
1137DDI_UNORDERED_OK_ACC = 0x01
1138DDI_MERGING_OK_ACC = 0x02
1139DDI_LOADCACHING_OK_ACC = 0x03
1140DDI_STORECACHING_OK_ACC = 0x04
1141DDI_DATA_SZ01_ACC = 1
1142DDI_DATA_SZ02_ACC = 2
1143DDI_DATA_SZ04_ACC = 4
1144DDI_DATA_SZ08_ACC = 8
1145VERS_ACCHDL = 0x0001
1146VERS1_NOFAULT = 1
1147PEEK_START = 1
1148POKE_START = 2
1149PEEK_FAULT = 4
1150POKE_FAULT = 8
1151DEVID_NONE = 0
1152DEVID_SCSI3_WWN = 1
1153DEVID_SCSI_SERIAL = 2
1154DEVID_FAB = 3
1155DEVID_ENCAP = 4
1156DEVID_MAXTYPE = 4
1157
1158# Included from sys/ddidmareq.h
1159DMA_UNIT_8 = 1
1160DMA_UNIT_16 = 2
1161DMA_UNIT_32 = 4
1162DMALIM_VER0 = ((0x86000000) + 0)
1163DDI_DMA_FORCE_PHYSICAL = 0x0100
1164DMA_ATTR_V0 = 0
1165DMA_ATTR_VERSION = DMA_ATTR_V0
1166DDI_DMA_CALLBACK_RUNOUT = 0
1167DDI_DMA_CALLBACK_DONE = 1
1168DDI_DMA_WRITE = 0x0001
1169DDI_DMA_READ = 0x0002
1170DDI_DMA_RDWR = (DDI_DMA_READ | DDI_DMA_WRITE)
1171DDI_DMA_REDZONE = 0x0004
1172DDI_DMA_PARTIAL = 0x0008
1173DDI_DMA_CONSISTENT = 0x0010
1174DDI_DMA_EXCLUSIVE = 0x0020
1175DDI_DMA_STREAMING = 0x0040
1176DDI_DMA_VME_USEA32 = 0x1000
1177DDI_DMA_SBUS_64BIT = 0x2000
1178DDI_DMA_MAPPED = 0
1179DDI_DMA_MAPOK = 0
1180DDI_DMA_PARTIAL_MAP = 1
1181DDI_DMA_DONE = 2
1182DDI_DMA_NORESOURCES = -1
1183DDI_DMA_NOMAPPING = -2
1184DDI_DMA_TOOBIG = -3
1185DDI_DMA_TOOSMALL = -4
1186DDI_DMA_LOCKED = -5
1187DDI_DMA_BADLIMITS = -6
1188DDI_DMA_STALE = -7
1189DDI_DMA_BADATTR = -8
1190DDI_DMA_INUSE = -9
1191DDI_DMA_SYNC_FORDEV = 0x0
1192DDI_DMA_SYNC_FORCPU = 0x1
1193DDI_DMA_SYNC_FORKERNEL = 0x2
1194
1195# Included from sys/ddimapreq.h
1196
1197# Included from sys/mman.h
1198PROT_READ = 0x1
1199PROT_WRITE = 0x2
1200PROT_EXEC = 0x4
1201PROT_USER = 0x8
1202PROT_ZFOD = (PROT_READ | PROT_WRITE | PROT_USER)
1203PROT_ZFOD = (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
1204PROT_ALL = (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
1205PROT_NONE = 0x0
1206MAP_SHARED = 1
1207MAP_PRIVATE = 2
1208MAP_TYPE = 0xf
1209MAP_FIXED = 0x10
1210MAP_NORESERVE = 0x40
1211MAP_RENAME = 0x20
1212PROC_TEXT = (PROT_EXEC | PROT_READ)
1213PROC_DATA = (PROT_READ | PROT_WRITE | PROT_EXEC)
1214SHARED = 0x10
1215PRIVATE = 0x20
1216VALID_ATTR = (PROT_READ|PROT_WRITE|PROT_EXEC|SHARED|PRIVATE)
1217PROT_EXCL = 0x20
1218MAP_INHERIT = 0x80
1219_MAP_NEW = 0x80000000
1220MADV_NORMAL = 0
1221MADV_RANDOM = 1
1222MADV_SEQUENTIAL = 2
1223MADV_WILLNEED = 3
1224MADV_DONTNEED = 4
1225MS_SYNC = 0x0
1226MS_ASYNC = 0x1
1227MS_INVALIDATE = 0x2
1228MC_SYNC = 1
1229MC_LOCK = 2
1230MC_UNLOCK = 3
1231MC_ADVISE = 4
1232MC_LOCKAS = 5
1233MC_UNLOCKAS = 6
1234MCL_CURRENT = 0x1
1235MCL_FUTURE = 0x2
1236DDI_MAP_VERSION = 0x0001
1237DDI_MF_USER_MAPPING = 0x1
1238DDI_MF_KERNEL_MAPPING = 0x2
1239DDI_MF_DEVICE_MAPPING = 0x4
1240DDI_ME_GENERIC = (-1)
1241DDI_ME_UNIMPLEMENTED = (-2)
1242DDI_ME_NORESOURCES = (-3)
1243DDI_ME_UNSUPPORTED = (-4)
1244DDI_ME_REGSPEC_RANGE = (-5)
1245DDI_ME_RNUMBER_RANGE = (-6)
1246DDI_ME_INVAL = (-7)
1247
1248# Included from sys/ddipropdefs.h
1249PH_FROM_PROM = 0x01
1250DDI_PROP_SUCCESS = 0
1251DDI_PROP_NOT_FOUND = 1
1252DDI_PROP_UNDEFINED = 2
1253DDI_PROP_NO_MEMORY = 3
1254DDI_PROP_INVAL_ARG = 4
1255DDI_PROP_BUF_TOO_SMALL = 5
1256DDI_PROP_CANNOT_DECODE = 6
1257DDI_PROP_CANNOT_ENCODE = 7
1258DDI_PROP_END_OF_DATA = 8
1259DDI_PROP_FOUND_1275 = 255
1260PROP_1275_INT_SIZE = 4
1261DDI_PROP_DONTPASS = 0x0001
1262DDI_PROP_CANSLEEP = 0x0002
1263DDI_PROP_SYSTEM_DEF = 0x0004
1264DDI_PROP_NOTPROM = 0x0008
1265DDI_PROP_DONTSLEEP = 0x0010
1266DDI_PROP_STACK_CREATE = 0x0020
1267DDI_PROP_UNDEF_IT = 0x0040
1268DDI_PROP_HW_DEF = 0x0080
1269DDI_PROP_TYPE_INT = 0x0100
1270DDI_PROP_TYPE_STRING = 0x0200
1271DDI_PROP_TYPE_BYTE = 0x0400
1272DDI_PROP_TYPE_COMPOSITE = 0x0800
1273DDI_PROP_TYPE_ANY = (DDI_PROP_TYPE_INT | \
1274 DDI_PROP_TYPE_STRING | \
1275 DDI_PROP_TYPE_BYTE | \
1276 DDI_PROP_TYPE_COMPOSITE)
1277DDI_PROP_TYPE_MASK = (DDI_PROP_TYPE_INT | \
1278 DDI_PROP_TYPE_STRING | \
1279 DDI_PROP_TYPE_BYTE | \
1280 DDI_PROP_TYPE_COMPOSITE)
1281DDI_RELATIVE_ADDRESSING = "relative-addressing"
1282DDI_GENERIC_ADDRESSING = "generic-addressing"
1283
1284# Included from sys/ddidevmap.h
1285KMEM_PAGEABLE = 0x100
1286KMEM_NON_PAGEABLE = 0x200
1287DEVMAP_OPS_REV = 1
1288DEVMAP_DEFAULTS = 0x00
1289DEVMAP_MAPPING_INVALID = 0x01
1290DEVMAP_ALLOW_REMAP = 0x02
1291DEVMAP_USE_PAGESIZE = 0x04
1292DEVMAP_UNLOAD_PENDING = 0x08
1293DEVMAP_SETUP_DONE = 0x100
1294DEVMAP_LOCK_INITED = 0x200
1295DEVMAP_FAULTING = 0x400
1296DEVMAP_LOCKED = 0x800
1297DEVMAP_FLAG_LARGE = 0x1000
1298DEVMAP_FLAG_KPMEM = 0x2000
1299DEVMAP_FLAG_KMEM = 0x4000
1300DEVMAP_FLAG_DEVMEM = 0x8000
1301PROT_NONE = 0x0
1302PROT_READ = 0x1
1303PROT_WRITE = 0x2
1304PROT_EXEC = 0x4
1305PROT_USER = 0x8
1306PROT_ALL = (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
1307DDI_UMEM_SLEEP = 0x0
1308DDI_UMEM_NOSLEEP = 0x01
1309DDI_UMEM_PAGEABLE = 0x02
1310
1311# Included from sys/nexusdefs.h
1312
1313# Included from sys/aio_req.h
1314BUSO_REV = 3
1315BUSO_REV_3 = 3
1316DEVO_REV = 3
1317CB_REV = 1
1318DDI_IDENTIFIED = (0)
1319DDI_NOT_IDENTIFIED = (-1)
1320DDI_PROBE_DONTCARE = 0
1321DDI_PROBE_PARTIAL = 1
1322DDI_PROBE_SUCCESS = 2
1323MAPDEV_REV = 1
1324
1325# Included from sys/model.h
1326DATAMODEL_MASK = 0x0FF00000
1327DATAMODEL_ILP32 = 0x00100000
1328DATAMODEL_LP64 = 0x00200000
1329DATAMODEL_NONE = 0
1330DATAMODEL_NATIVE = DATAMODEL_LP64
1331DATAMODEL_NATIVE = DATAMODEL_ILP32
1332D_NEW = 0x00
1333D_OLD = 0x01
1334D_TAPE = 0x08
1335D_NOBRKUP = 0x10
1336D_MTSAFE = 0x0020
1337_D_QNEXTLESS = 0x0040
1338_D_MTOCSHARED = 0x0080
1339D_MTOCEXCL = 0x0800
1340D_MTPUTSHARED = 0x1000
1341D_MTPERQ = 0x2000
1342D_MTQPAIR = 0x4000
1343D_MTPERMOD = 0x6000
1344D_MTOUTPERIM = 0x8000
1345D_MTINNER_MOD = (D_MTPUTSHARED|_D_MTOCSHARED)
1346D_MTOUTER_MOD = (D_MTOCEXCL)
1347D_MP = D_MTSAFE
1348D_64BIT = 0x200
1349D_SYNCSTR = 0x400
1350D_DEVMAP = 0x100
1351D_MODELS = DATAMODEL_MASK
1352D_ILP32 = DATAMODEL_ILP32
1353D_LP64 = DATAMODEL_LP64
1354D_NATIVE = DATAMODEL_NATIVE
1355D_HOTPLUG = 0x4
1356SNDZERO = 0x001
1357SNDPIPE = 0x002
1358RNORM = 0x000
1359RMSGD = 0x001
1360RMSGN = 0x002
1361RMODEMASK = 0x003
1362RPROTDAT = 0x004
1363RPROTDIS = 0x008
1364RPROTNORM = 0x010
1365RPROTMASK = 0x01c
1366RFLUSHMASK = 0x020
1367RFLUSHPCPROT = 0x020
1368RERRNORM = 0x001
1369RERRNONPERSIST = 0x002
1370RERRMASK = (RERRNORM|RERRNONPERSIST)
1371WERRNORM = 0x004
1372WERRNONPERSIST = 0x008
1373WERRMASK = (WERRNORM|WERRNONPERSIST)
1374FLUSHR = 0x01
1375FLUSHW = 0x02
1376FLUSHRW = 0x03
1377FLUSHBAND = 0x04
1378MAPINOK = 0x01
1379NOMAPIN = 0x02
1380REMAPOK = 0x04
1381NOREMAP = 0x08
1382S_INPUT = 0x0001
1383S_HIPRI = 0x0002
1384S_OUTPUT = 0x0004
1385S_MSG = 0x0008
1386S_ERROR = 0x0010
1387S_HANGUP = 0x0020
1388S_RDNORM = 0x0040
1389S_WRNORM = S_OUTPUT
1390S_RDBAND = 0x0080
1391S_WRBAND = 0x0100
1392S_BANDURG = 0x0200
1393RS_HIPRI = 0x01
1394STRUIO_POSTPONE = 0x08
1395STRUIO_MAPIN = 0x10
1396MSG_HIPRI = 0x01
1397MSG_ANY = 0x02
1398MSG_BAND = 0x04
1399MSG_XPG4 = 0x08
1400MSG_IPEEK = 0x10
1401MSG_DISCARDTAIL = 0x20
1402MSG_HOLDSIG = 0x40
1403MSG_IGNERROR = 0x80
1404MSG_DELAYERROR = 0x100
1405MSG_IGNFLOW = 0x200
1406MSG_NOMARK = 0x400
1407MORECTL = 1
1408MOREDATA = 2
1409MUXID_ALL = (-1)
1410ANYMARK = 0x01
1411LASTMARK = 0x02
1412STR = (ord('S')<<8)
1413I_NREAD = (STR|01)
1414I_PUSH = (STR|02)
1415I_POP = (STR|03)
1416I_LOOK = (STR|04)
1417I_FLUSH = (STR|05)
1418I_SRDOPT = (STR|06)
1419I_GRDOPT = (STR|07)
1420I_STR = (STR|010)
1421I_SETSIG = (STR|011)
1422I_GETSIG = (STR|012)
1423I_FIND = (STR|013)
1424I_LINK = (STR|014)
1425I_UNLINK = (STR|015)
1426I_PEEK = (STR|017)
1427I_FDINSERT = (STR|020)
1428I_SENDFD = (STR|021)
1429I_RECVFD = (STR|022)
1430I_E_RECVFD = (STR|016)
1431I_RECVFD = (STR|016)
1432I_SWROPT = (STR|023)
1433I_GWROPT = (STR|024)
1434I_LIST = (STR|025)
1435I_PLINK = (STR|026)
1436I_PUNLINK = (STR|027)
1437I_FLUSHBAND = (STR|034)
1438I_CKBAND = (STR|035)
1439I_GETBAND = (STR|036)
1440I_ATMARK = (STR|037)
1441I_SETCLTIME = (STR|040)
1442I_GETCLTIME = (STR|041)
1443I_CANPUT = (STR|042)
1444I_SERROPT = (STR|043)
1445I_GERROPT = (STR|044)
1446I_ESETSIG = (STR|045)
1447I_EGETSIG = (STR|046)
1448__I_PUSH_NOCTTY = (STR|047)
1449_INFTIM = -1
1450INFTIM = _INFTIM