summaryrefslogtreecommitdiffstats
path: root/Lib/irix6/FILE.py
blob: e3393b6f17e7df6487f737e7ec70029c61940b59 (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
# Generated by h2py from /usr/include/sys/file.h

# Included from standards.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 string.h
NULL = 0L
NBBY = 8

# Included from sys/sema.h
MUTEX_DEFAULT = 0x0
METER_NAMSZ = 8
def mutex_spinlock(l): return splhi()

def mutex_spintrylock(l): return splhi()

def spinlock_islocked(l): return issplhi(getsr())

def spinlock_initialized(l): return 1

SV_FIFO = 0x0
SV_LIFO = 0x2
SV_PRIO = 0x4
SV_DEFAULT = SV_FIFO
SEMA_NOHIST = 0x0001
SEMA_LOCK = 0x0004
SEMA_METER = 0x0008
SEMA_NAMSZ = METER_NAMSZ
MR_ACCESS = 0x1
MR_UPDATE = 0x2
def mp_mutex_unlock(m): return mutex_unlock(m)

def mp_mutex_trylock(m): return mutex_trylock(m)

def mp_mutex_spinlock(m): return mutex_spinlock(m)

def mp_mutex_trylock(m): return 1

def mp_mutex_spinlock(m): return 1

def nested_spintrylock(m): return 1

def mp_mrunlock(a): return mrunlock(a)

def mp_cpsema(x): return cpsema(x)

def mp_cvsema(x): return cvsema(x)

def mp_cpsema(x): return 1

def mp_cvsema(x): return 0

MON_LOCKED = 0x01
MON_WAITING = 0x02
MON_TIMEOUT = 0x04
def initlock(l): return spinlock_init(l,0)

def ownlock(x): return 1

def splock(x): return 1

def io_splock(x): return 1

def mutex_enter(m): return mutex_lock(m, PZERO)

def mutex_tryenter(m): return mutex_trylock(m)

def mutex_exit(m): return mutex_unlock(m)

def cv_signal(cv): return sv_signal(cv)

def cv_broadcast(cv): return sv_broadcast(cv)

def cv_destroy(cv): return sv_destroy(cv)

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/fcntl.h
FNDELAY = 0x04
FAPPEND = 0x08
FSYNC = 0x10
FDSYNC = 0x20
FRSYNC = 0x40
FNONBLOCK = 0x80
FASYNC = 0x1000
FLARGEFILE = 0x2000
FNONBLK = FNONBLOCK
FDIRECT = 0x8000
FDIRENT64 = 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_DSYNC = 0x20
O_RSYNC = 0x40
O_NONBLOCK = 0x80
O_LARGEFILE = 0x2000
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_RESVSP = 40
F_UNRESVSP = 41
F_RESVSP64 = 42
F_UNRESVSP64 = 43
F_GETBMAPA = 44
F_FSGETXATTRA = 45
F_GETALLLK = 46
F_RSETLK = 20
F_RGETLK = 21
F_RSETLKW = 22
F_GETOWN = 23
F_SETOWN = 24
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
FDSYNC = 0x20
FRSYNC = 0x40
FNONBLOCK = 0x80
FASYNC = 0x1000
FNONBLK = FNONBLOCK
FLARGEFILE = 0x2000
FDIRECT = 0x8000
FCREAT = 0x0100
FTRUNC = 0x0200
FEXCL = 0x0400
FNOCTTY = 0x0800
FMARK = 0x4000
FDEFER = 0x2000
FINPROGRESS = 0x0400
FINVIS = 0x0100
FNMFS = 0x2000
FDIRENT64 = 0x8000
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