blob: 05697c15e1e03e9ae26e8f32c5990952e0898881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
# Generated by h2py from /usr/include/sys/file.h
# Included from sys/types.h
# Included from sgidefs.h
_MIPS_ISA_MIPS1 = 1
_MIPS_ISA_MIPS2 = 2
_MIPS_ISA_MIPS3 = 3
_MIPS_ISA_MIPS4 = 4
_MIPS_SIM_ABI32 = 1
_MIPS_SIM_NABI32 = 2
_MIPS_SIM_ABI64 = 3
P_MYID = (-1)
P_MYHOSTID = (-1)
# Included from sys/bsd_types.h
# Included from sys/mkdev.h
ONBITSMAJOR = 7
ONBITSMINOR = 8
OMAXMAJ = 0x7f
OMAXMIN = 0xff
NBITSMAJOR = 14
NBITSMINOR = 18
MAXMAJ = 0x1ff
MAXMIN = 0x3ffff
OLDDEV = 0
NEWDEV = 1
MKDEV_VER = NEWDEV
def major(dev): return __major(MKDEV_VER, dev)
def minor(dev): return __minor(MKDEV_VER, dev)
# Included from sys/select.h
FD_SETSIZE = 1024
NBBY = 8
# Included from sys/sema.h
HP_NOPOLICY = 0
HP_ADDOFF = 1
HP_MULOFF = 2
SEMA_NAMSZ = 8
SEMA_NOHIST = 0x1
SEMA_LIFO = 0x2
SEMA_MUTEX = 0x4
SEMA_METER = 0x8
SEMAOP_PSEMA = 1
SEMAOP_VSEMA = 2
SEMAOP_CPSEMA = 3
SEMAOP_CVSEMA = 4
SEMAOP_WSEMA = 5
SEMAOP_UNSEMA = 6
SEMAOP_INIT = 7
SEMAOP_FREE = 8
SSOP_PHIT = 1
SSOP_PSLP = 2
SSOP_PWAKE = 6
SSOP_PRESIG = 7
SSOP_POSTSIG = 8
SSOP_VNOWAKE = 3
SSOP_VWAKE = 4
SSOP_CPHIT = 1
SSOP_CPMISS = 5
SSOP_CVNOWAKE = 3
SSOP_CVWAKE = 4
SSOP_WMISS = 5
SSOP_WWAKE = 4
SSOP_RMV = 9
TZERO = 10
SEMA_NOP = 0
SEMA_WAKE = 1
SEMA_VSEMA = 2
SEMA_SPINOP = 3
MR_ACCESS = 0x1
MR_UPDATE = 0x2
def cv_signal(cv): return cvsema(cv);
def cv_destroy(cv): return freesema(cv)
def mutex_enter(m): return psema(m, PZERO | PNOSTOP)
def mutex_exit(m): return vsema(m)
def mutex_destroy(m): return freesema(m)
def MUTEX_HELD(m): return (ownsema(m))
def MUTEX_HELD(m): return (1)
RW_READER = MR_ACCESS
RW_WRITER = MR_UPDATE
def rw_exit(r): return mrunlock(r)
def rw_tryupgrade(r): return cmrpromote(r)
def rw_downgrade(r): return mrdemote(r)
def rw_destroy(r): return mrfree(r)
def RW_WRITE_HELD(r): return ismrlocked(r, MR_UPDATE)
def RW_READ_HELD(r): return ismrlocked(r, MR_ACCESS)
# Included from sys/splock.h
SPLOCKNAMSIZ = 8
SPLOCK_NONE = 0
SPLOCK_SOFT = 1
SPLOCK_HARD = 2
OWNER_NONE = -1
MAP_LOCKID = 0
SPLOCK_MAX = (96*1024)
SPLOCK_MAX = 32768
MIN_POOL_SIZE = 256
MAX_POOL_SIZE = 16384
DEF_SEMA_POOL = 8192
DEF_VNODE_POOL = 1024
DEF_FILE_POOL = 1024
def ownlock(x): return 1
def splock(x): return 1
def io_splock(x): return 1
def apvsema(x): return vsema(x)
def apcpsema(x): return cpsema(x)
def apcvsema(x): return cvsema(x)
def mp_mrunlock(a): return mrunlock(a)
def apvsema(x): return 0
def apcpsema(x): return 1
def apcvsema(x): return 0
def mp_mrunlock(a): return 0
# Included from sys/fcntl.h
FNDELAY = 0x04
FAPPEND = 0x08
FSYNC = 0x10
FNONBLOCK = 0x80
FASYNC = 0x1000
FNONBLK = FNONBLOCK
FDIRECT = 0x8000
FCREAT = 0x0100
FTRUNC = 0x0200
FEXCL = 0x0400
FNOCTTY = 0x0800
O_RDONLY = 0
O_WRONLY = 1
O_RDWR = 2
O_NDELAY = 0x04
O_APPEND = 0x08
O_SYNC = 0x10
O_NONBLOCK = 0x80
O_DIRECT = 0x8000
O_CREAT = 0x100
O_TRUNC = 0x200
O_EXCL = 0x400
O_NOCTTY = 0x800
F_DUPFD = 0
F_GETFD = 1
F_SETFD = 2
F_GETFL = 3
F_SETFL = 4
F_GETLK = 14
F_SETLK = 6
F_SETLKW = 7
F_CHKFL = 8
F_ALLOCSP = 10
F_FREESP = 11
F_SETBSDLK = 12
F_SETBSDLKW = 13
F_DIOINFO = 30
F_FSGETXATTR = 31
F_FSSETXATTR = 32
F_GETLK64 = 33
F_SETLK64 = 34
F_SETLKW64 = 35
F_ALLOCSP64 = 36
F_FREESP64 = 37
F_GETBMAP = 38
F_FSSETDM = 39
F_RSETLK = 20
F_RGETLK = 21
F_RSETLKW = 22
F_GETOWN = 23
F_SETOWN = 24
F_O_GETLK = 5
F_O_GETOWN = 10
F_O_SETOWN = 11
F_RDLCK = 01
F_WRLCK = 02
F_UNLCK = 03
O_ACCMODE = 3
FD_CLOEXEC = 1
FD_NODUP_FORK = 4
FMASK = 0x90FF
FOPEN = 0xFFFFFFFF
FREAD = 0x01
FWRITE = 0x02
FNDELAY = 0x04
FAPPEND = 0x08
FSYNC = 0x10
FNONBLOCK = 0x80
FASYNC = 0x1000
FNONBLK = FNONBLOCK
FDIRECT = 0x8000
FCREAT = 0x0100
FTRUNC = 0x0200
FEXCL = 0x0400
FNOCTTY = 0x0800
IRIX4_FASYNC = 0x40
FMARK = 0x4000
FDEFER = 0x2000
FINPROGRESS = 0x0400
FINVIS = 0x0100
FNMFS = 0x2000
FCLOSEXEC = 001
FDSHD = 0x0001
FDNOMARK = 0x0002
FDIGNPROGRESS = 0x0004
LOCK_SH = 1
LOCK_EX = 2
LOCK_NB = 4
LOCK_UN = 8
F_OK = 0
X_OK = 1
W_OK = 2
R_OK = 4
L_SET = 0
L_INCR = 1
L_XTND = 2
|