zsyscall_linux_386.go 35.3 KB
Newer Older
Albert Strasheim's avatar
Albert Strasheim committed
1
// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
2 3 4 5
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT

package syscall

6
import "unsafe"
7

Russ Cox's avatar
Russ Cox committed
8 9
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
10
func open(path string, mode int, perm uint32) (fd int, err error) {
11 12 13 14 15 16
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
17
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
18 19 20
	if e1 != 0 {
		err = e1
	}
21 22 23
	return
}

Russ Cox's avatar
Russ Cox committed
24 25
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
26
func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
27 28 29 30 31 32
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
33
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
34 35 36
	if e1 != 0 {
		err = e1
	}
37 38 39
	return
}

Russ Cox's avatar
Russ Cox committed
40 41
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
42
func pipe(p *[2]_C_int) (err error) {
43
	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
Russ Cox's avatar
Russ Cox committed
44 45 46
	if e1 != 0 {
		err = e1
	}
47
	return
48 49
}

Russ Cox's avatar
Russ Cox committed
50 51
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
52
func utimes(path string, times *[2]Timeval) (err error) {
53 54 55 56 57 58
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
Russ Cox's avatar
Russ Cox committed
59 60 61
	if e1 != 0 {
		err = e1
	}
62
	return
63 64
}

Russ Cox's avatar
Russ Cox committed
65 66
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
67
func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
68
	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
Russ Cox's avatar
Russ Cox committed
69 70 71
	if e1 != 0 {
		err = e1
	}
72
	return
73 74
}

Russ Cox's avatar
Russ Cox committed
75 76
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
77
func Getcwd(buf []byte) (n int, err error) {
78
	var _p0 unsafe.Pointer
79
	if len(buf) > 0 {
80
		_p0 = unsafe.Pointer(&buf[0])
81 82
	} else {
		_p0 = unsafe.Pointer(&_zero)
83
	}
84
	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
85
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
86 87 88
	if e1 != 0 {
		err = e1
	}
89
	return
90 91
}

Russ Cox's avatar
Russ Cox committed
92 93
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
94
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
95 96
	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
	wpid = int(r0)
Russ Cox's avatar
Russ Cox committed
97 98 99
	if e1 != 0 {
		err = e1
	}
100
	return
101 102
}

Russ Cox's avatar
Russ Cox committed
103 104
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
105
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
106
	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
Russ Cox's avatar
Russ Cox committed
107 108 109
	if e1 != 0 {
		err = e1
	}
110
	return
111 112
}

Russ Cox's avatar
Russ Cox committed
113 114
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
115
func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
116 117 118 119 120 121
	var _p0 *byte
	_p0, err = BytePtrFromString(arg)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
122 123 124
	if e1 != 0 {
		err = e1
	}
125 126 127 128 129
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
130
func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
	var _p0 *byte
	_p0, err = BytePtrFromString(source)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(target)
	if err != nil {
		return
	}
	var _p2 *byte
	_p2, err = BytePtrFromString(fstype)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
Russ Cox's avatar
Russ Cox committed
147 148 149
	if e1 != 0 {
		err = e1
	}
150 151 152 153 154
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
155
func Access(path string, mode uint32) (err error) {
156 157 158 159 160 161
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Cox's avatar
Russ Cox committed
162 163 164
	if e1 != 0 {
		err = e1
	}
165
	return
166 167
}

Russ Cox's avatar
Russ Cox committed
168 169
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
170
func Acct(path string) (err error) {
171 172 173 174 175 176
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
177 178 179
	if e1 != 0 {
		err = e1
	}
180
	return
181 182
}

Russ Cox's avatar
Russ Cox committed
183 184
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
185
func Adjtimex(buf *Timex) (state int, err error) {
186 187
	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
	state = int(r0)
Russ Cox's avatar
Russ Cox committed
188 189 190
	if e1 != 0 {
		err = e1
	}
191
	return
192 193
}

Russ Cox's avatar
Russ Cox committed
194 195
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
196
func Chdir(path string) (err error) {
197 198 199 200 201 202
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
203 204 205
	if e1 != 0 {
		err = e1
	}
206
	return
207 208
}

Russ Cox's avatar
Russ Cox committed
209 210
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
211
func Chmod(path string, mode uint32) (err error) {
212 213 214 215 216 217
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Cox's avatar
Russ Cox committed
218 219 220
	if e1 != 0 {
		err = e1
	}
221
	return
222 223
}

Russ Cox's avatar
Russ Cox committed
224 225
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
226
func Chroot(path string) (err error) {
227 228 229 230 231 232
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
233 234 235
	if e1 != 0 {
		err = e1
	}
236
	return
237 238
}

Russ Cox's avatar
Russ Cox committed
239 240
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
241
func Close(fd int) (err error) {
242
	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
Russ Cox's avatar
Russ Cox committed
243 244 245
	if e1 != 0 {
		err = e1
	}
246
	return
247 248
}

Russ Cox's avatar
Russ Cox committed
249 250
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
251
func Creat(path string, mode uint32) (fd int, err error) {
252 253 254 255 256 257
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
258
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
259 260 261
	if e1 != 0 {
		err = e1
	}
262
	return
263 264
}

Russ Cox's avatar
Russ Cox committed
265 266
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
267
func Dup(oldfd int) (fd int, err error) {
268
	r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
269
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
270 271 272
	if e1 != 0 {
		err = e1
	}
273
	return
274 275
}

Russ Cox's avatar
Russ Cox committed
276 277
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

278 279
func Dup2(oldfd int, newfd int) (err error) {
	_, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
Russ Cox's avatar
Russ Cox committed
280 281 282
	if e1 != 0 {
		err = e1
	}
283
	return
284 285
}

Russ Cox's avatar
Russ Cox committed
286 287
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
288
func EpollCreate(size int) (fd int, err error) {
289
	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
290
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
291 292 293
	if e1 != 0 {
		err = e1
	}
294
	return
295 296
}

Russ Cox's avatar
Russ Cox committed
297 298
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

299 300 301 302 303 304 305 306 307 308 309
func EpollCreate1(flag int) (fd int, err error) {
	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
	fd = int(r0)
	if e1 != 0 {
		err = e1
	}
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
310
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
311
	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
Russ Cox's avatar
Russ Cox committed
312 313 314
	if e1 != 0 {
		err = e1
	}
315
	return
316 317
}

Russ Cox's avatar
Russ Cox committed
318 319
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
320
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
321
	var _p0 unsafe.Pointer
322
	if len(events) > 0 {
323
		_p0 = unsafe.Pointer(&events[0])
324 325
	} else {
		_p0 = unsafe.Pointer(&_zero)
326
	}
327
	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
328
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
329 330 331
	if e1 != 0 {
		err = e1
	}
332
	return
333 334
}

Russ Cox's avatar
Russ Cox committed
335 336
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

337
func Exit(code int) {
338 339
	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
	return
340 341
}

Russ Cox's avatar
Russ Cox committed
342 343
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
344
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
345 346 347 348 349 350
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
Russ Cox's avatar
Russ Cox committed
351 352 353
	if e1 != 0 {
		err = e1
	}
354
	return
355 356
}

Russ Cox's avatar
Russ Cox committed
357 358
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
359
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
360
	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
Russ Cox's avatar
Russ Cox committed
361 362 363
	if e1 != 0 {
		err = e1
	}
364
	return
365 366
}

Russ Cox's avatar
Russ Cox committed
367 368
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
369
func Fchdir(fd int) (err error) {
370
	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
Russ Cox's avatar
Russ Cox committed
371 372 373
	if e1 != 0 {
		err = e1
	}
374
	return
375 376
}

Russ Cox's avatar
Russ Cox committed
377 378
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
379
func Fchmod(fd int, mode uint32) (err error) {
380
	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
Russ Cox's avatar
Russ Cox committed
381 382 383
	if e1 != 0 {
		err = e1
	}
384
	return
385 386
}

Russ Cox's avatar
Russ Cox committed
387 388
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
389
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
390 391 392 393 394 395
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
Russ Cox's avatar
Russ Cox committed
396 397 398
	if e1 != 0 {
		err = e1
	}
399
	return
400 401
}

Russ Cox's avatar
Russ Cox committed
402 403
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
404
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
405 406 407 408 409 410
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
Russ Cox's avatar
Russ Cox committed
411 412 413
	if e1 != 0 {
		err = e1
	}
414
	return
415 416
}

Russ Cox's avatar
Russ Cox committed
417 418
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
419
func fcntl(fd int, cmd int, arg int) (val int, err error) {
420 421
	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
	val = int(r0)
Russ Cox's avatar
Russ Cox committed
422 423 424
	if e1 != 0 {
		err = e1
	}
425
	return
426 427
}

Russ Cox's avatar
Russ Cox committed
428 429
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
430
func Fdatasync(fd int) (err error) {
431
	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
Russ Cox's avatar
Russ Cox committed
432 433 434
	if e1 != 0 {
		err = e1
	}
435
	return
436 437
}

Russ Cox's avatar
Russ Cox committed
438 439
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
440
func Flock(fd int, how int) (err error) {
Russ Cox's avatar
Russ Cox committed
441
	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
Russ Cox's avatar
Russ Cox committed
442 443 444
	if e1 != 0 {
		err = e1
	}
Russ Cox's avatar
Russ Cox committed
445 446 447 448 449
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
450
func Fsync(fd int) (err error) {
451
	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
Russ Cox's avatar
Russ Cox committed
452 453 454
	if e1 != 0 {
		err = e1
	}
455
	return
456 457
}

Russ Cox's avatar
Russ Cox committed
458 459
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
460
func Getdents(fd int, buf []byte) (n int, err error) {
461
	var _p0 unsafe.Pointer
462
	if len(buf) > 0 {
463
		_p0 = unsafe.Pointer(&buf[0])
464 465
	} else {
		_p0 = unsafe.Pointer(&_zero)
466
	}
467
	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
468
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
469 470 471
	if e1 != 0 {
		err = e1
	}
472
	return
473 474
}

Russ Cox's avatar
Russ Cox committed
475 476
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
477
func Getpgid(pid int) (pgid int, err error) {
478
	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
479
	pgid = int(r0)
Russ Cox's avatar
Russ Cox committed
480 481 482
	if e1 != 0 {
		err = e1
	}
483
	return
484 485
}

Russ Cox's avatar
Russ Cox committed
486 487
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

488
func Getpgrp() (pid int) {
489
	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
490 491
	pid = int(r0)
	return
492 493
}

Russ Cox's avatar
Russ Cox committed
494 495
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

496
func Getpid() (pid int) {
497
	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
498 499
	pid = int(r0)
	return
500 501
}

Russ Cox's avatar
Russ Cox committed
502 503
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

504
func Getppid() (ppid int) {
505
	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
506 507
	ppid = int(r0)
	return
508 509
}

Russ Cox's avatar
Russ Cox committed
510 511
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
512
func Getrusage(who int, rusage *Rusage) (err error) {
513
	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
Russ Cox's avatar
Russ Cox committed
514 515 516
	if e1 != 0 {
		err = e1
	}
517
	return
518 519
}

Russ Cox's avatar
Russ Cox committed
520 521
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

522
func Gettid() (tid int) {
523
	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
524 525
	tid = int(r0)
	return
526 527
}

Russ Cox's avatar
Russ Cox committed
528 529
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
530
func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
531 532 533 534 535 536
	var _p0 *byte
	_p0, err = BytePtrFromString(pathname)
	if err != nil {
		return
	}
	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
Balazs Lecz's avatar
Balazs Lecz committed
537
	watchdesc = int(r0)
Russ Cox's avatar
Russ Cox committed
538 539 540
	if e1 != 0 {
		err = e1
	}
Balazs Lecz's avatar
Balazs Lecz committed
541 542 543 544 545
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
546
func InotifyInit() (fd int, err error) {
547
	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
Balazs Lecz's avatar
Balazs Lecz committed
548
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
549 550 551
	if e1 != 0 {
		err = e1
	}
Balazs Lecz's avatar
Balazs Lecz committed
552 553 554 555 556
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
557
func InotifyInit1(flags int) (fd int, err error) {
558
	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
Balazs Lecz's avatar
Balazs Lecz committed
559
	fd = int(r0)
Russ Cox's avatar
Russ Cox committed
560 561 562
	if e1 != 0 {
		err = e1
	}
Balazs Lecz's avatar
Balazs Lecz committed
563 564 565 566 567
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
568
func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
569
	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
Balazs Lecz's avatar
Balazs Lecz committed
570
	success = int(r0)
Russ Cox's avatar
Russ Cox committed
571 572 573
	if e1 != 0 {
		err = e1
	}
Balazs Lecz's avatar
Balazs Lecz committed
574 575 576 577 578
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

579
func Kill(pid int, sig Signal) (err error) {
580
	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
Russ Cox's avatar
Russ Cox committed
581 582 583
	if e1 != 0 {
		err = e1
	}
584
	return
585 586
}

Russ Cox's avatar
Russ Cox committed
587 588
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
589
func Klogctl(typ int, buf []byte) (n int, err error) {
590
	var _p0 unsafe.Pointer
591
	if len(buf) > 0 {
592
		_p0 = unsafe.Pointer(&buf[0])
593 594
	} else {
		_p0 = unsafe.Pointer(&_zero)
595
	}
596
	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
597
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
598 599 600
	if e1 != 0 {
		err = e1
	}
601
	return
602 603
}

Russ Cox's avatar
Russ Cox committed
604 605
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
606
func Link(oldpath string, newpath string) (err error) {
607 608 609 610 611 612 613 614 615 616 617
	var _p0 *byte
	_p0, err = BytePtrFromString(oldpath)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(newpath)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Cox's avatar
Russ Cox committed
618 619 620
	if e1 != 0 {
		err = e1
	}
621
	return
622 623
}

Russ Cox's avatar
Russ Cox committed
624 625
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
626
func Mkdir(path string, mode uint32) (err error) {
627 628 629 630 631 632
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Cox's avatar
Russ Cox committed
633 634 635
	if e1 != 0 {
		err = e1
	}
636
	return
637 638
}

Russ Cox's avatar
Russ Cox committed
639 640
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
641
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
642 643 644 645 646 647
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
Russ Cox's avatar
Russ Cox committed
648 649 650
	if e1 != 0 {
		err = e1
	}
651
	return
652 653
}

Russ Cox's avatar
Russ Cox committed
654 655
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
656
func Mknod(path string, mode uint32, dev int) (err error) {
657 658 659 660 661 662
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
Russ Cox's avatar
Russ Cox committed
663 664 665
	if e1 != 0 {
		err = e1
	}
666
	return
667 668
}

Russ Cox's avatar
Russ Cox committed
669 670
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
671
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
672 673 674 675 676 677
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
Russ Cox's avatar
Russ Cox committed
678 679 680
	if e1 != 0 {
		err = e1
	}
681
	return
682 683
}

Russ Cox's avatar
Russ Cox committed
684 685
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
686
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
687
	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
Russ Cox's avatar
Russ Cox committed
688 689 690
	if e1 != 0 {
		err = e1
	}
691
	return
692 693
}

Russ Cox's avatar
Russ Cox committed
694 695
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
696
func Pause() (err error) {
697
	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
Russ Cox's avatar
Russ Cox committed
698 699 700
	if e1 != 0 {
		err = e1
	}
701
	return
702 703
}

Russ Cox's avatar
Russ Cox committed
704 705
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
706
func PivotRoot(newroot string, putold string) (err error) {
707 708 709 710 711 712 713 714 715 716 717
	var _p0 *byte
	_p0, err = BytePtrFromString(newroot)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(putold)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Cox's avatar
Russ Cox committed
718 719 720
	if e1 != 0 {
		err = e1
	}
721
	return
722 723
}

Russ Cox's avatar
Russ Cox committed
724 725
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

726
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
727 728 729 730 731 732 733 734 735
	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
	if e1 != 0 {
		err = e1
	}
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Dmitriy Vyukov's avatar
Dmitriy Vyukov committed
736
func read(fd int, p []byte) (n int, err error) {
737
	var _p0 unsafe.Pointer
738
	if len(p) > 0 {
739
		_p0 = unsafe.Pointer(&p[0])
740 741
	} else {
		_p0 = unsafe.Pointer(&_zero)
742
	}
743
	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
744
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
745 746 747
	if e1 != 0 {
		err = e1
	}
748
	return
749 750
}

Russ Cox's avatar
Russ Cox committed
751 752
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
753
func Readlink(path string, buf []byte) (n int, err error) {
754 755 756 757 758 759
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	var _p1 unsafe.Pointer
760
	if len(buf) > 0 {
761
		_p1 = unsafe.Pointer(&buf[0])
762
	} else {
763
		_p1 = unsafe.Pointer(&_zero)
764
	}
765
	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
766
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
767 768 769
	if e1 != 0 {
		err = e1
	}
770
	return
771 772
}

Russ Cox's avatar
Russ Cox committed
773 774
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
775
func Rename(oldpath string, newpath string) (err error) {
776 777 778 779 780 781 782 783 784 785 786
	var _p0 *byte
	_p0, err = BytePtrFromString(oldpath)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(newpath)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Cox's avatar
Russ Cox committed
787 788 789
	if e1 != 0 {
		err = e1
	}
790
	return
791 792
}

Russ Cox's avatar
Russ Cox committed
793 794
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
795
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
796 797 798 799 800 801 802 803 804 805 806
	var _p0 *byte
	_p0, err = BytePtrFromString(oldpath)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(newpath)
	if err != nil {
		return
	}
	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
Russ Cox's avatar
Russ Cox committed
807 808 809
	if e1 != 0 {
		err = e1
	}
810
	return
811 812
}

Russ Cox's avatar
Russ Cox committed
813 814
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
815
func Rmdir(path string) (err error) {
816 817 818 819 820 821
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
822 823 824
	if e1 != 0 {
		err = e1
	}
825
	return
826 827
}

Russ Cox's avatar
Russ Cox committed
828 829
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
830
func Setdomainname(p []byte) (err error) {
831
	var _p0 unsafe.Pointer
832
	if len(p) > 0 {
833
		_p0 = unsafe.Pointer(&p[0])
834 835
	} else {
		_p0 = unsafe.Pointer(&_zero)
836
	}
837
	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
Russ Cox's avatar
Russ Cox committed
838 839 840
	if e1 != 0 {
		err = e1
	}
841
	return
842 843
}

Russ Cox's avatar
Russ Cox committed
844 845
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
846
func Sethostname(p []byte) (err error) {
847
	var _p0 unsafe.Pointer
848
	if len(p) > 0 {
849
		_p0 = unsafe.Pointer(&p[0])
850 851
	} else {
		_p0 = unsafe.Pointer(&_zero)
852
	}
853
	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
Russ Cox's avatar
Russ Cox committed
854 855 856
	if e1 != 0 {
		err = e1
	}
857
	return
858 859
}

Russ Cox's avatar
Russ Cox committed
860 861
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
862
func Setpgid(pid int, pgid int) (err error) {
863
	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
Russ Cox's avatar
Russ Cox committed
864 865 866
	if e1 != 0 {
		err = e1
	}
867
	return
868 869
}

Russ Cox's avatar
Russ Cox committed
870 871
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
872
func Setsid() (pid int, err error) {
873
	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
874
	pid = int(r0)
Russ Cox's avatar
Russ Cox committed
875 876 877
	if e1 != 0 {
		err = e1
	}
878
	return
879 880
}

Russ Cox's avatar
Russ Cox committed
881 882
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
883
func Settimeofday(tv *Timeval) (err error) {
884
	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
Russ Cox's avatar
Russ Cox committed
885 886 887
	if e1 != 0 {
		err = e1
	}
888
	return
889 890
}

Russ Cox's avatar
Russ Cox committed
891 892
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
893
func Setuid(uid int) (err error) {
894
	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
Russ Cox's avatar
Russ Cox committed
895 896 897
	if e1 != 0 {
		err = e1
	}
898
	return
899 900
}

Russ Cox's avatar
Russ Cox committed
901 902
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
903
func Symlink(oldpath string, newpath string) (err error) {
904 905 906 907 908 909 910 911 912 913 914
	var _p0 *byte
	_p0, err = BytePtrFromString(oldpath)
	if err != nil {
		return
	}
	var _p1 *byte
	_p1, err = BytePtrFromString(newpath)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Cox's avatar
Russ Cox committed
915 916 917
	if e1 != 0 {
		err = e1
	}
918
	return
919 920
}

Russ Cox's avatar
Russ Cox committed
921 922
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

923
func Sync() {
924 925
	Syscall(SYS_SYNC, 0, 0, 0)
	return
926 927
}

Russ Cox's avatar
Russ Cox committed
928 929
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
930
func Sysinfo(info *Sysinfo_t) (err error) {
931
	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
Russ Cox's avatar
Russ Cox committed
932 933 934
	if e1 != 0 {
		err = e1
	}
935
	return
936 937
}

Russ Cox's avatar
Russ Cox committed
938 939
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
940
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
941 942
	r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
	n = int64(int64(r1)<<32 | int64(r0))
Russ Cox's avatar
Russ Cox committed
943 944 945
	if e1 != 0 {
		err = e1
	}
946
	return
947 948
}

Russ Cox's avatar
Russ Cox committed
949 950
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

951
func Tgkill(tgid int, tid int, sig Signal) (err error) {
952
	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
Russ Cox's avatar
Russ Cox committed
953 954 955
	if e1 != 0 {
		err = e1
	}
956
	return
957 958
}

Russ Cox's avatar
Russ Cox committed
959 960
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
961
func Times(tms *Tms) (ticks uintptr, err error) {
962
	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
963
	ticks = uintptr(r0)
Russ Cox's avatar
Russ Cox committed
964 965 966
	if e1 != 0 {
		err = e1
	}
967
	return
968 969
}

Russ Cox's avatar
Russ Cox committed
970 971
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

972
func Umask(mask int) (oldmask int) {
973
	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
974 975
	oldmask = int(r0)
	return
976 977
}

Russ Cox's avatar
Russ Cox committed
978 979
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
980
func Uname(buf *Utsname) (err error) {
981
	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
Russ Cox's avatar
Russ Cox committed
982 983 984
	if e1 != 0 {
		err = e1
	}
985
	return
986 987
}

Russ Cox's avatar
Russ Cox committed
988 989
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
990
func Unlink(path string) (err error) {
991 992 993 994 995 996
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Cox's avatar
Russ Cox committed
997 998 999
	if e1 != 0 {
		err = e1
	}
1000
	return
1001 1002
}

Russ Cox's avatar
Russ Cox committed
1003 1004
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1005
func Unlinkat(dirfd int, path string) (err error) {
1006 1007 1008 1009 1010 1011
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 0)
Russ Cox's avatar
Russ Cox committed
1012 1013 1014
	if e1 != 0 {
		err = e1
	}
1015
	return
1016 1017
}

Russ Cox's avatar
Russ Cox committed
1018 1019
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1020
func Unmount(target string, flags int) (err error) {
1021 1022 1023 1024 1025 1026
	var _p0 *byte
	_p0, err = BytePtrFromString(target)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
Russ Cox's avatar
Russ Cox committed
1027 1028 1029
	if e1 != 0 {
		err = e1
	}
1030 1031 1032 1033 1034
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1035
func Unshare(flags int) (err error) {
1036
	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
Russ Cox's avatar
Russ Cox committed
1037 1038 1039
	if e1 != 0 {
		err = e1
	}
1040
	return
1041 1042
}

Russ Cox's avatar
Russ Cox committed
1043 1044
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1045
func Ustat(dev int, ubuf *Ustat_t) (err error) {
1046
	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
Russ Cox's avatar
Russ Cox committed
1047 1048 1049
	if e1 != 0 {
		err = e1
	}
1050
	return
1051 1052
}

Russ Cox's avatar
Russ Cox committed
1053 1054
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1055
func Utime(path string, buf *Utimbuf) (err error) {
1056 1057 1058 1059 1060 1061
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
Russ Cox's avatar
Russ Cox committed
1062 1063 1064
	if e1 != 0 {
		err = e1
	}
1065
	return
1066 1067
}

Russ Cox's avatar
Russ Cox committed
1068 1069
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Dmitriy Vyukov's avatar
Dmitriy Vyukov committed
1070
func write(fd int, p []byte) (n int, err error) {
1071
	var _p0 unsafe.Pointer
1072
	if len(p) > 0 {
1073
		_p0 = unsafe.Pointer(&p[0])
1074 1075
	} else {
		_p0 = unsafe.Pointer(&_zero)
1076
	}
1077
	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1078
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1079 1080 1081
	if e1 != 0 {
		err = e1
	}
1082
	return
1083 1084
}

Russ Cox's avatar
Russ Cox committed
1085 1086
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1087
func exitThread(code int) (err error) {
1088
	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
Russ Cox's avatar
Russ Cox committed
1089 1090 1091
	if e1 != 0 {
		err = e1
	}
1092
	return
1093 1094
}

Russ Cox's avatar
Russ Cox committed
1095 1096
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Dmitriy Vyukov's avatar
Dmitriy Vyukov committed
1097
func readlen(fd int, p *byte, np int) (n int, err error) {
1098 1099
	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1100 1101 1102
	if e1 != 0 {
		err = e1
	}
1103
	return
1104 1105
}

Russ Cox's avatar
Russ Cox committed
1106 1107
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Dmitriy Vyukov's avatar
Dmitriy Vyukov committed
1108
func writelen(fd int, p *byte, np int) (n int, err error) {
1109 1110
	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1111 1112 1113
	if e1 != 0 {
		err = e1
	}
1114
	return
1115 1116
}

Russ Cox's avatar
Russ Cox committed
1117 1118
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1119
func munmap(addr uintptr, length uintptr) (err error) {
1120
	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
Russ Cox's avatar
Russ Cox committed
1121 1122 1123
	if e1 != 0 {
		err = e1
	}
1124 1125 1126 1127 1128
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1129
func Madvise(b []byte, advice int) (err error) {
1130 1131 1132 1133 1134 1135 1136
	var _p0 unsafe.Pointer
	if len(b) > 0 {
		_p0 = unsafe.Pointer(&b[0])
	} else {
		_p0 = unsafe.Pointer(&_zero)
	}
	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
Russ Cox's avatar
Russ Cox committed
1137 1138 1139
	if e1 != 0 {
		err = e1
	}
1140 1141 1142 1143 1144
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1145
func Mprotect(b []byte, prot int) (err error) {
1146 1147 1148 1149 1150 1151 1152
	var _p0 unsafe.Pointer
	if len(b) > 0 {
		_p0 = unsafe.Pointer(&b[0])
	} else {
		_p0 = unsafe.Pointer(&_zero)
	}
	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
Russ Cox's avatar
Russ Cox committed
1153 1154 1155
	if e1 != 0 {
		err = e1
	}
1156 1157 1158 1159 1160
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1161
func Mlock(b []byte) (err error) {
1162 1163 1164 1165 1166 1167 1168
	var _p0 unsafe.Pointer
	if len(b) > 0 {
		_p0 = unsafe.Pointer(&b[0])
	} else {
		_p0 = unsafe.Pointer(&_zero)
	}
	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
Russ Cox's avatar
Russ Cox committed
1169 1170 1171
	if e1 != 0 {
		err = e1
	}
1172 1173 1174 1175 1176
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1177
func Munlock(b []byte) (err error) {
1178 1179 1180 1181 1182 1183 1184
	var _p0 unsafe.Pointer
	if len(b) > 0 {
		_p0 = unsafe.Pointer(&b[0])
	} else {
		_p0 = unsafe.Pointer(&_zero)
	}
	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
Russ Cox's avatar
Russ Cox committed
1185 1186 1187
	if e1 != 0 {
		err = e1
	}
1188 1189 1190 1191 1192
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1193
func Mlockall(flags int) (err error) {
1194
	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
Russ Cox's avatar
Russ Cox committed
1195 1196 1197
	if e1 != 0 {
		err = e1
	}
1198 1199 1200 1201 1202
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1203
func Munlockall() (err error) {
1204
	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
Russ Cox's avatar
Russ Cox committed
1205 1206 1207
	if e1 != 0 {
		err = e1
	}
1208 1209 1210 1211 1212
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1213
func Chown(path string, uid int, gid int) (err error) {
1214 1215 1216 1217 1218 1219
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
Russ Cox's avatar
Russ Cox committed
1220 1221 1222
	if e1 != 0 {
		err = e1
	}
1223
	return
Russ Cox's avatar
Russ Cox committed
1224 1225
}

Russ Cox's avatar
Russ Cox committed
1226 1227
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1228
func Fchown(fd int, uid int, gid int) (err error) {
1229
	_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
Russ Cox's avatar
Russ Cox committed
1230 1231 1232
	if e1 != 0 {
		err = e1
	}
1233
	return
Russ Cox's avatar
Russ Cox committed
1234 1235
}

Russ Cox's avatar
Russ Cox committed
1236 1237
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1238
func Fstat(fd int, stat *Stat_t) (err error) {
1239
	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
Russ Cox's avatar
Russ Cox committed
1240 1241 1242
	if e1 != 0 {
		err = e1
	}
1243
	return
Russ Cox's avatar
Russ Cox committed
1244 1245
}

Russ Cox's avatar
Russ Cox committed
1246 1247
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1248
func Ftruncate(fd int, length int64) (err error) {
1249
	_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
Russ Cox's avatar
Russ Cox committed
1250 1251 1252
	if e1 != 0 {
		err = e1
	}
1253 1254 1255 1256 1257
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1258
func Getegid() (egid int) {
1259
	r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
1260 1261
	egid = int(r0)
	return
Russ Cox's avatar
Russ Cox committed
1262 1263
}

Russ Cox's avatar
Russ Cox committed
1264 1265
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1266
func Geteuid() (euid int) {
1267
	r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
1268 1269
	euid = int(r0)
	return
Russ Cox's avatar
Russ Cox committed
1270 1271
}

Russ Cox's avatar
Russ Cox committed
1272 1273
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1274
func Getgid() (gid int) {
1275
	r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
1276 1277
	gid = int(r0)
	return
Russ Cox's avatar
Russ Cox committed
1278 1279
}

Russ Cox's avatar
Russ Cox committed
1280 1281
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1282
func Getuid() (uid int) {
1283
	r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
1284 1285
	uid = int(r0)
	return
Russ Cox's avatar
Russ Cox committed
1286 1287
}

Russ Cox's avatar
Russ Cox committed
1288 1289
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1290
func Ioperm(from int, num int, on int) (err error) {
1291
	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
Russ Cox's avatar
Russ Cox committed
1292 1293 1294
	if e1 != 0 {
		err = e1
	}
1295
	return
Russ Cox's avatar
Russ Cox committed
1296 1297
}

Russ Cox's avatar
Russ Cox committed
1298 1299
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1300
func Iopl(level int) (err error) {
1301
	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
Russ Cox's avatar
Russ Cox committed
1302 1303 1304
	if e1 != 0 {
		err = e1
	}
1305
	return
Russ Cox's avatar
Russ Cox committed
1306 1307
}

Russ Cox's avatar
Russ Cox committed
1308 1309
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1310
func Lchown(path string, uid int, gid int) (err error) {
1311 1312 1313 1314 1315 1316
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
Russ Cox's avatar
Russ Cox committed
1317 1318 1319
	if e1 != 0 {
		err = e1
	}
1320
	return
Russ Cox's avatar
Russ Cox committed
1321 1322
}

Russ Cox's avatar
Russ Cox committed
1323 1324
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1325
func Lstat(path string, stat *Stat_t) (err error) {
1326 1327 1328 1329 1330 1331
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
Russ Cox's avatar
Russ Cox committed
1332 1333 1334
	if e1 != 0 {
		err = e1
	}
1335
	return
Russ Cox's avatar
Russ Cox committed
1336 1337
}

Russ Cox's avatar
Russ Cox committed
1338 1339
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1340
func Pread(fd int, p []byte, offset int64) (n int, err error) {
1341 1342 1343
	var _p0 unsafe.Pointer
	if len(p) > 0 {
		_p0 = unsafe.Pointer(&p[0])
1344 1345
	} else {
		_p0 = unsafe.Pointer(&_zero)
1346 1347 1348
	}
	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1349 1350 1351
	if e1 != 0 {
		err = e1
	}
1352 1353 1354 1355 1356
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1357
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1358 1359 1360
	var _p0 unsafe.Pointer
	if len(p) > 0 {
		_p0 = unsafe.Pointer(&p[0])
1361 1362
	} else {
		_p0 = unsafe.Pointer(&_zero)
1363 1364 1365
	}
	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1366 1367 1368
	if e1 != 0 {
		err = e1
	}
1369 1370 1371 1372 1373
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

1374
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
Brad Fitzpatrick's avatar
Brad Fitzpatrick committed
1375 1376
	r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
	written = int(r0)
Russ Cox's avatar
Russ Cox committed
1377 1378 1379
	if e1 != 0 {
		err = e1
	}
Brad Fitzpatrick's avatar
Brad Fitzpatrick committed
1380 1381 1382 1383 1384
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1385
func Setfsgid(gid int) (err error) {
1386
	_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
Russ Cox's avatar
Russ Cox committed
1387 1388 1389
	if e1 != 0 {
		err = e1
	}
1390
	return
Russ Cox's avatar
Russ Cox committed
1391 1392
}

Russ Cox's avatar
Russ Cox committed
1393 1394
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1395
func Setfsuid(uid int) (err error) {
1396
	_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
Russ Cox's avatar
Russ Cox committed
1397 1398 1399
	if e1 != 0 {
		err = e1
	}
1400
	return
Russ Cox's avatar
Russ Cox committed
1401 1402
}

Russ Cox's avatar
Russ Cox committed
1403 1404
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1405
func Setgid(gid int) (err error) {
1406
	_, _, e1 := RawSyscall(SYS_SETGID32, uintptr(gid), 0, 0)
Russ Cox's avatar
Russ Cox committed
1407 1408 1409
	if e1 != 0 {
		err = e1
	}
1410
	return
Russ Cox's avatar
Russ Cox committed
1411 1412
}

Russ Cox's avatar
Russ Cox committed
1413 1414
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1415
func Setregid(rgid int, egid int) (err error) {
1416
	_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
Russ Cox's avatar
Russ Cox committed
1417 1418 1419
	if e1 != 0 {
		err = e1
	}
1420
	return
Russ Cox's avatar
Russ Cox committed
1421 1422
}

Russ Cox's avatar
Russ Cox committed
1423 1424
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1425
func Setresgid(rgid int, egid int, sgid int) (err error) {
1426
	_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
Russ Cox's avatar
Russ Cox committed
1427 1428 1429
	if e1 != 0 {
		err = e1
	}
1430
	return
Russ Cox's avatar
Russ Cox committed
1431 1432
}

Russ Cox's avatar
Russ Cox committed
1433 1434
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1435
func Setresuid(ruid int, euid int, suid int) (err error) {
1436
	_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
Russ Cox's avatar
Russ Cox committed
1437 1438 1439
	if e1 != 0 {
		err = e1
	}
1440
	return
Russ Cox's avatar
Russ Cox committed
1441 1442
}

Russ Cox's avatar
Russ Cox committed
1443 1444
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1445
func Setreuid(ruid int, euid int) (err error) {
1446
	_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
Russ Cox's avatar
Russ Cox committed
1447 1448 1449
	if e1 != 0 {
		err = e1
	}
1450
	return
Russ Cox's avatar
Russ Cox committed
1451 1452
}

Russ Cox's avatar
Russ Cox committed
1453
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1454

Russ Cox's avatar
Russ Cox committed
1455
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
1456 1457
	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1458 1459 1460
	if e1 != 0 {
		err = e1
	}
1461 1462 1463 1464
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
Russ Cox's avatar
Russ Cox committed
1465

Russ Cox's avatar
Russ Cox committed
1466
func Stat(path string, stat *Stat_t) (err error) {
1467 1468 1469 1470 1471 1472
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
Russ Cox's avatar
Russ Cox committed
1473 1474 1475
	if e1 != 0 {
		err = e1
	}
1476
	return
Russ Cox's avatar
Russ Cox committed
1477 1478
}

Russ Cox's avatar
Russ Cox committed
1479 1480
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1481
func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
1482
	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
Russ Cox's avatar
Russ Cox committed
1483 1484 1485
	if e1 != 0 {
		err = e1
	}
1486
	return
Russ Cox's avatar
Russ Cox committed
1487 1488
}

Russ Cox's avatar
Russ Cox committed
1489 1490
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1491
func Truncate(path string, length int64) (err error) {
1492 1493 1494 1495 1496 1497
	var _p0 *byte
	_p0, err = BytePtrFromString(path)
	if err != nil {
		return
	}
	_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
Russ Cox's avatar
Russ Cox committed
1498 1499 1500
	if e1 != 0 {
		err = e1
	}
1501 1502 1503 1504 1505
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1506
func getgroups(n int, list *_Gid_t) (nn int, err error) {
1507
	r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
1508
	nn = int(r0)
Russ Cox's avatar
Russ Cox committed
1509 1510 1511
	if e1 != 0 {
		err = e1
	}
1512
	return
Russ Cox's avatar
Russ Cox committed
1513 1514
}

Russ Cox's avatar
Russ Cox committed
1515 1516
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1517
func setgroups(n int, list *_Gid_t) (err error) {
1518
	_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
Russ Cox's avatar
Russ Cox committed
1519 1520 1521
	if e1 != 0 {
		err = e1
	}
1522
	return
Russ Cox's avatar
Russ Cox committed
1523 1524
}

Russ Cox's avatar
Russ Cox committed
1525 1526
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1527
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
1528 1529
	r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
	n = int(r0)
Russ Cox's avatar
Russ Cox committed
1530 1531 1532
	if e1 != 0 {
		err = e1
	}
1533
	return
1534
}
1535

Russ Cox's avatar
Russ Cox committed
1536 1537
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1538
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
1539 1540
	r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
	xaddr = uintptr(r0)
Russ Cox's avatar
Russ Cox committed
1541 1542 1543
	if e1 != 0 {
		err = e1
	}
1544 1545 1546 1547 1548
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568
func getrlimit(resource int, rlim *rlimit32) (err error) {
	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
	if e1 != 0 {
		err = e1
	}
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func setrlimit(resource int, rlim *rlimit32) (err error) {
	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
	if e1 != 0 {
		err = e1
	}
	return
}

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1569
func Gettimeofday(tv *Timeval) (err error) {
1570
	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
Russ Cox's avatar
Russ Cox committed
1571 1572 1573
	if e1 != 0 {
		err = e1
	}
1574 1575 1576
	return
}

Russ Cox's avatar
Russ Cox committed
1577 1578
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

Russ Cox's avatar
Russ Cox committed
1579
func Time(t *Time_t) (tt Time_t, err error) {
1580
	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
1581
	tt = Time_t(r0)
Russ Cox's avatar
Russ Cox committed
1582 1583 1584
	if e1 != 0 {
		err = e1
	}
1585 1586
	return
}