1 # Generated by h2py from /usr/include/sys/stropts.h
3 # Included from sys/feature_tests.h
5 # Included from sys/isa_defs.h
10 _LONG_LONG_ALIGNMENT
= 8
12 _LONG_DOUBLE_ALIGNMENT
= 16
13 _POINTER_ALIGNMENT
= 8
15 _ALIGNMENT_REQUIRED
= 1
20 _LONG_LONG_ALIGNMENT
= 4
22 _LONG_DOUBLE_ALIGNMENT
= 4
23 _POINTER_ALIGNMENT
= 4
25 _ALIGNMENT_REQUIRED
= 0
29 _LONG_LONG_ALIGNMENT
= 8
31 _ALIGNMENT_REQUIRED
= 1
33 _LONG_DOUBLE_ALIGNMENT
= 8
34 _POINTER_ALIGNMENT
= 4
37 _LONG_DOUBLE_ALIGNMENT
= 16
38 _POINTER_ALIGNMENT
= 8
41 _LARGEFILE64_SOURCE
= 1
43 _FILE_OFFSET_BITS
= 64
44 _FILE_OFFSET_BITS
= 32
45 _POSIX_C_SOURCE
= 199506L
46 _POSIX_PTHREAD_SEMANTICS
= 1
52 # Included from sys/conf.h
54 # Included from sys/t_lock.h
56 # Included from sys/machlock.h
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)
65 DISP_LEVEL
= (LOCK_LEVEL
+ 1)
67 PTR24_MSB
= (PTR24_LSB
+ 24)
69 PTR24_BASE
= 0xe0000000
71 # Included from sys/param.h
77 GID_NOBODY
= UID_NOBODY
81 DEFAULT_MAXPID
= 999999
82 DEFAULT_JUMPPID
= 100000
83 DEFAULT_MAXPID
= 30000
93 NGROUPS_MAX_DEFAULT
= 16
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 \
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)
161 _SEM_NSEMS_MAX
= INT_MAX
162 _SEM_VALUE_MAX
= INT_MAX
164 # Included from sys/unistd.h
169 _CS_LFS_LINTFLAGS
= 71
170 _CS_LFS64_CFLAGS
= 72
171 _CS_LFS64_LDFLAGS
= 73
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
201 _SC_XOPEN_VERSION
= 12
202 _SC_NPROCESSORS_CONF
= 14
203 _SC_NPROCESSORS_ONLN
= 15
206 _SC_AIO_LISTIO_MAX
= 18
208 _SC_AIO_PRIO_DELTA_MAX
= 20
209 _SC_ASYNCHRONOUS_IO
= 21
210 _SC_DELAYTIMER_MAX
= 22
212 _SC_MAPPED_FILES
= 24
214 _SC_MEMLOCK_RANGE
= 26
215 _SC_MEMORY_PROTECTION
= 27
216 _SC_MESSAGE_PASSING
= 28
219 _SC_PRIORITIZED_IO
= 31
220 _SC_PRIORITY_SCHEDULING
= 32
221 _SC_REALTIME_SIGNALS
= 33
224 _SC_SEM_NSEMS_MAX
= 36
225 _SC_SEM_VALUE_MAX
= 37
226 _SC_SHARED_MEMORY_OBJECTS
= 38
227 _SC_SIGQUEUE_MAX
= 39
230 _SC_SYNCHRONIZED_IO
= 42
244 _SC_BC_SCALE_MAX
= 56
245 _SC_BC_STRING_MAX
= 57
246 _SC_COLL_WEIGHTS_MAX
= 58
247 _SC_EXPR_NEST_MAX
= 59
251 _SC_XOPEN_ENH_I18N
= 63
254 _SC_XOPEN_XCU_VERSION
= 67
258 _SC_PAGE_SIZE
= _SC_PAGESIZE
261 _SC_AVPHYS_PAGES
= 501
262 _SC_COHER_BLKSZ
= 503
263 _SC_SPLIT_CACHE
= 504
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
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
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
306 _PC_CHOWN_RESTRICTED
= 9
310 _PC_FILESIZEBITS
= 67
312 _POSIX_VERSION
= 199506L
313 _POSIX2_VERSION
= 199209L
314 _POSIX2_C_VERSION
= 199209L
315 _XOPEN_XCU_VERSION
= 4
320 _POSIX2_CHAR_TERM
= 1
321 _POSIX2_LOCALEDEF
= 1
326 # Included from sys/mutex.h
328 def MUTEX_HELD(x
): return (mutex_owned(x
))
331 # Included from sys/rwlock.h
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
347 # Included from sys/klwp.h
350 # Included from sys/condvar.h
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 \
378 def ITIMERVAL_OVERFLOW(itv
): return \
385 # Included from sys/time_impl.h
386 def TIMESPEC_OVERFLOW(ts
): return \
388 def ITIMERSPEC_OVERFLOW(it
): return \
390 __CLOCK_REALTIME0
= 0
393 __CLOCK_REALTIME3
= 3
396 CLOCK_REALTIME
= __CLOCK_REALTIME3
397 CLOCK_REALTIME
= __CLOCK_REALTIME0
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
430 # Included from iso/time_iso.h
433 CLOCKS_PER_SEC
= 1000000
435 # Included from sys/select.h
440 def FD_ZERO(p
): return bzero((p
), sizeof (*(p
)))
443 # Included from sys/signal.h
445 # Included from sys/iso/signal_iso.h
498 # Included from sys/siginfo.h
511 # Included from sys/machsig.h
565 # Included from sys/time_std_impl.h
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
586 SS_ONSTACK
= 0x00000001
587 SS_DISABLE
= 0x00000002
592 # Included from sys/ucontext.h
595 # Included from sys/regset.h
628 SPARC_MAXREGWINDOW
= 31
632 # Included from v7/sys/privregs.h
634 # Included from v7/sys/psr.h
649 PSR_IMPL
= 0xF0000000
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
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)
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)
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
740 UC_MCONTEXT
= (UC_CPU|UC_FPU|UC_ASR
)
741 UC_ALL
= (UC_SIGMASK|UC_STACK|UC_MCONTEXT
)
745 # Included from sys/pcb.h
756 # Included from sys/msacct.h
769 # Included from sys/lwp.h
771 # Included from sys/synch.h
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
783 LOCK_ROBUST_NP
= 0x40
785 LOCK_NOTRECOVERABLE
= 0x2
788 LWP_DETACHED
= 0x00000040
789 LWP_SUSPENDED
= 0x00000080
790 __LWP_ASLWP
= 0x00000100
802 T_INTR_THREAD
= 0x0001
806 T_WOULDBLOCK
= 0x0020
824 TP_CHANGEBIND
= 0x1000
826 TS_DONT_SWAP
= 0x0002
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
)))
848 NO_COMPETING_THREADS
= 1
851 # Included from sys/systm.h
854 # Included from sys/proc.h
856 # Included from sys/cred.h
858 # Included from sys/user.h
861 # Included from sys/resource.h
873 RLIMIT_AS
= RLIMIT_VMEM
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
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
915 # Included from sys/auxv.h
936 AT_SUN_LPAGESZ
= 2007
937 AT_SUN_PLATFORM
= 2008
941 AT_SUN_EMUL_ENTRY
= 2012
942 AT_SUN_EMUL_EXECFD
= 2013
943 AT_SUN_EXECNAME
= 2014
946 # Included from sys/errno.h
1005 ENOTRECOVERABLE
= 59
1044 EPROTONOSUPPORT
= 120
1045 ESOCKTNOSUPPORT
= 121
1065 EWOULDBLOCK
= EAGAIN
1072 __KERN_NAUXV_IMPL
= 19
1073 __KERN_NAUXV_IMPL
= 21
1074 __KERN_NAUXV_IMPL
= 21
1077 # Included from sys/watchpoint.h
1080 # Included from vm/seg_enum.h
1082 # Included from sys/copyops.h
1085 # Included from sys/buf.h
1087 # Included from sys/kstat.h
1090 def KSTAT_ENTER(k
): return \
1092 def KSTAT_EXIT(k
): return \
1095 KSTAT_TYPE_NAMED
= 1
1098 KSTAT_TYPE_TIMER
= 4
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
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
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
1125 KSTAT_INTR_WATCHDOG
= 2
1126 KSTAT_INTR_SPURIOUS
= 3
1127 KSTAT_INTR_MULTSVC
= 4
1142 B_DONTNEED
= 0x002000
1143 B_REMAPPED
= 0x004000
1148 B_NOCACHE
= 0x080000
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
1166 # Included from sys/timer.h
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
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
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
1221 # Included from sys/id_space.h
1224 # Included from sys/vmem.h
1226 VM_SLEEP
= 0x00000000
1227 VM_NOSLEEP
= 0x00000001
1228 VM_PANIC
= 0x00000002
1229 VM_KMFLAGS
= 0x000000ff
1230 VM_BESTFIT
= 0x00000100
1237 # Included from sys/exacct_impl.h
1240 # Included from sys/kmem.h
1247 KMC_NOTOUCH
= 0x00010000
1248 KMC_NODEBUG
= 0x00020000
1249 KMC_NOMAGAZINE
= 0x00040000
1250 KMC_NOHASH
= 0x00080000
1251 KMC_QCACHE
= 0x00100000
1266 SPREXEC
= 0x00000020
1267 SPROCTR
= 0x00000040
1268 SPRFORK
= 0x00000080
1269 SKILLED
= 0x00000100
1271 SRUNLCL
= 0x00000400
1272 SBPTADJ
= 0x00000800
1273 SKILLCL
= 0x00001000
1274 SOWEUPC
= 0x00002000
1275 SEXECED
= 0x00004000
1276 SPASYNC
= 0x00008000
1278 SNOWAIT
= 0x00020000
1280 SVFWAIT
= 0x00080000
1281 EXITLWPS
= 0x00100000
1282 HOLDFORK
= 0x00200000
1283 SWAITSIG
= 0x00400000
1284 HOLDFORK1
= 0x00800000
1285 COREDUMP
= 0x01000000
1286 SMSACCT
= 0x02000000
1288 SPRLOCK
= 0x08000000
1290 HOLDWATCH
= 0x20000000
1291 SMSFORK
= 0x40000000
1292 SDOCORE
= 0x80000000
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
1316 DEVID_SCSI_SERIAL
= 2
1321 # Included from sys/varargs.h
1323 # Included from sys/va_list.h
1325 def _ARGSIZEOF(t
): return ((sizeof (t
) + VA_ALIGN
- 1) & ~
(VA_ALIGN
- 1))
1328 def _ARGSIZEOF(t
): return ((sizeof (t
) + VA_ALIGN
- 1) & ~
(VA_ALIGN
- 1))
1340 # Included from sys/devops.h
1343 # Included from sys/poll.h
1348 POLLWRNORM
= POLLOUT
1351 POLLNORM
= POLLRDNORM
1360 # Included from vm/as.h
1362 # Included from vm/seg.h
1364 # Included from sys/vnode.h
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
)
1411 def MANDMODE(mode
): return (((mode
) & (VSGID|
(VEXEC
>>3))) == VSGID
)
1416 VSA_DFACLCNT
= 0x0008
1427 # Included from vm/faultcode.h
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
1444 # Included from vm/page.h
1446 PAGE_HASHVPSHIFT
= 6
1449 PG_PHYSCONTIG
= 0x0004
1450 PG_MATCH_COLOR
= 0x0008
1456 def page_next_raw(PP
): return page_nextn_raw((PP
), 1)
1459 PAGE_IO_WANTED
= 0x2
1465 def PP_SETAGED(pp
): return ASSERT(PP_ISAGED(pp
))
1467 HAT_FLAGS_RESV
= 0xFF000000
1469 HAT_LOAD_LOCK
= 0x01
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
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
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
)
1504 HAT_ADV_PGUNLOAD
= 0x00
1505 HAT_FORCE_PGUNLOAD
= 0x01
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
))
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
1543 SEGP_ASYNC_FLUSH
= 0x1
1544 SEGP_FORCE_WIRED
= 0x2
1547 def seg_pages(seg
): return \
1553 def AS_TYPE_64BIT(as_
): return \
1555 AS_LREP_LINKEDLIST
= 0
1556 AS_LREP_SKIPLIST
= 1
1557 AS_MUTATION_THRESH
= 225
1563 # Included from sys/ddidmareq.h
1567 DMALIM_VER0
= ((0x86000000) + 0)
1568 DDI_DMA_FORCE_PHYSICAL
= 0x0100
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
1584 DDI_DMA_PARTIAL_MAP
= 1
1586 DDI_DMA_NORESOURCES
= -1
1587 DDI_DMA_NOMAPPING
= -2
1589 DDI_DMA_TOOSMALL
= -4
1591 DDI_DMA_BADLIMITS
= -6
1593 DDI_DMA_BADATTR
= -8
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
1606 PROT_ZFOD
= (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER
)
1607 PROT_ALL
= (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER
)
1613 MAP_NORESERVE
= 0x40
1615 MAP_ANONYMOUS
= MAP_ANON
1617 PROC_TEXT
= (PROT_EXEC | PROT_READ
)
1618 PROC_DATA
= (PROT_READ | PROT_WRITE | PROT_EXEC
)
1621 VALID_ATTR
= (PROT_READ|PROT_WRITE|PROT_EXEC|SHARED|PRIVATE
)
1624 _MAP_NEW
= 0x80000000
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)
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
)
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
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
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
1740 _D_QNEXTLESS
= 0x0040
1741 _D_MTOCSHARED
= 0x0080
1743 D_MTPUTSHARED
= 0x1000
1747 D_MTOUTPERIM
= 0x8000
1748 _D_MTCBSHARED
= 0x10000
1749 D_MTINNER_MOD
= (D_MTPUTSHARED|_D_MTOCSHARED|_D_MTCBSHARED
)
1750 D_MTOUTER_MOD
= (D_MTOCEXCL
)
1767 RFLUSHPCPROT
= 0x020
1769 RERRNONPERSIST
= 0x002
1770 RERRMASK
= (RERRNORM|RERRNONPERSIST
)
1772 WERRNONPERSIST
= 0x008
1773 WERRMASK
= (WERRNORM|WERRNONPERSIST
)
1794 STRUIO_POSTPONE
= 0x08
1801 MSG_DISCARDTAIL
= 0x20
1804 MSG_DELAYERROR
= 0x100