Source file src/pkg/syscall/zsyscall_linux_amd64.go
1 // mksyscall.pl syscall_linux.go syscall_linux_amd64.go
2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
3
4 package syscall
5
6 import "unsafe"
7
8 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9
10 func open(path string, mode int, perm uint32) (fd int, err error) {
11 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm))
12 fd = int(r0)
13 if e1 != 0 {
14 err = e1
15 }
16 return
17 }
18
19 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20
21 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
22 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0)
23 fd = int(r0)
24 if e1 != 0 {
25 err = e1
26 }
27 return
28 }
29
30 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31
32 func pipe(p *[2]_C_int) (err error) {
33 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
34 if e1 != 0 {
35 err = e1
36 }
37 return
38 }
39
40 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
41
42 func utimes(path string, times *[2]Timeval) (err error) {
43 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0)
44 if e1 != 0 {
45 err = e1
46 }
47 return
48 }
49
50 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
51
52 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
53 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
54 if e1 != 0 {
55 err = e1
56 }
57 return
58 }
59
60 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
61
62 func Getcwd(buf []byte) (n int, err error) {
63 var _p0 unsafe.Pointer
64 if len(buf) > 0 {
65 _p0 = unsafe.Pointer(&buf[0])
66 } else {
67 _p0 = unsafe.Pointer(&_zero)
68 }
69 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
70 n = int(r0)
71 if e1 != 0 {
72 err = e1
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
80 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
81 wpid = int(r0)
82 if e1 != 0 {
83 err = e1
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
91 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
92 if e1 != 0 {
93 err = e1
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
101 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(StringBytePtr(arg))), 0, 0)
102 if e1 != 0 {
103 err = e1
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
111 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
112 if e1 != 0 {
113 err = e1
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func Access(path string, mode uint32) (err error) {
121 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0)
122 if e1 != 0 {
123 err = e1
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Acct(path string) (err error) {
131 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0)
132 if e1 != 0 {
133 err = e1
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func Adjtimex(buf *Timex) (state int, err error) {
141 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
142 state = int(r0)
143 if e1 != 0 {
144 err = e1
145 }
146 return
147 }
148
149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
150
151 func Chdir(path string) (err error) {
152 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0)
153 if e1 != 0 {
154 err = e1
155 }
156 return
157 }
158
159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
160
161 func Chmod(path string, mode uint32) (err error) {
162 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0)
163 if e1 != 0 {
164 err = e1
165 }
166 return
167 }
168
169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
170
171 func Chroot(path string) (err error) {
172 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0)
173 if e1 != 0 {
174 err = e1
175 }
176 return
177 }
178
179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
180
181 func Close(fd int) (err error) {
182 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
183 if e1 != 0 {
184 err = e1
185 }
186 return
187 }
188
189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
190
191 func Creat(path string, mode uint32) (fd int, err error) {
192 r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0)
193 fd = int(r0)
194 if e1 != 0 {
195 err = e1
196 }
197 return
198 }
199
200 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
201
202 func Dup(oldfd int) (fd int, err error) {
203 r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
204 fd = int(r0)
205 if e1 != 0 {
206 err = e1
207 }
208 return
209 }
210
211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
212
213 func Dup2(oldfd int, newfd int) (err error) {
214 _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
215 if e1 != 0 {
216 err = e1
217 }
218 return
219 }
220
221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
222
223 func EpollCreate(size int) (fd int, err error) {
224 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
225 fd = int(r0)
226 if e1 != 0 {
227 err = e1
228 }
229 return
230 }
231
232 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
233
234 func EpollCreate1(flag int) (fd int, err error) {
235 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
236 fd = int(r0)
237 if e1 != 0 {
238 err = e1
239 }
240 return
241 }
242
243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
244
245 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
246 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
247 if e1 != 0 {
248 err = e1
249 }
250 return
251 }
252
253 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
254
255 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
256 var _p0 unsafe.Pointer
257 if len(events) > 0 {
258 _p0 = unsafe.Pointer(&events[0])
259 } else {
260 _p0 = unsafe.Pointer(&_zero)
261 }
262 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
263 n = int(r0)
264 if e1 != 0 {
265 err = e1
266 }
267 return
268 }
269
270 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
271
272 func Exit(code int) {
273 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
280 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0)
281 if e1 != 0 {
282 err = e1
283 }
284 return
285 }
286
287 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
288
289 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
290 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
291 if e1 != 0 {
292 err = e1
293 }
294 return
295 }
296
297 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
298
299 func Fchdir(fd int) (err error) {
300 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
301 if e1 != 0 {
302 err = e1
303 }
304 return
305 }
306
307 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
308
309 func Fchmod(fd int, mode uint32) (err error) {
310 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
311 if e1 != 0 {
312 err = e1
313 }
314 return
315 }
316
317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
318
319 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
320 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0)
321 if e1 != 0 {
322 err = e1
323 }
324 return
325 }
326
327 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
328
329 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
330 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0)
331 if e1 != 0 {
332 err = e1
333 }
334 return
335 }
336
337 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
338
339 func fcntl(fd int, cmd int, arg int) (val int, err error) {
340 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
341 val = int(r0)
342 if e1 != 0 {
343 err = e1
344 }
345 return
346 }
347
348 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
349
350 func Fdatasync(fd int) (err error) {
351 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
352 if e1 != 0 {
353 err = e1
354 }
355 return
356 }
357
358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
359
360 func Flock(fd int, how int) (err error) {
361 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
362 if e1 != 0 {
363 err = e1
364 }
365 return
366 }
367
368 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
369
370 func Fsync(fd int) (err error) {
371 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
372 if e1 != 0 {
373 err = e1
374 }
375 return
376 }
377
378 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
379
380 func Getdents(fd int, buf []byte) (n int, err error) {
381 var _p0 unsafe.Pointer
382 if len(buf) > 0 {
383 _p0 = unsafe.Pointer(&buf[0])
384 } else {
385 _p0 = unsafe.Pointer(&_zero)
386 }
387 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
388 n = int(r0)
389 if e1 != 0 {
390 err = e1
391 }
392 return
393 }
394
395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396
397 func Getpgid(pid int) (pgid int, err error) {
398 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
399 pgid = int(r0)
400 if e1 != 0 {
401 err = e1
402 }
403 return
404 }
405
406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
407
408 func Getpgrp() (pid int) {
409 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
410 pid = int(r0)
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Getpid() (pid int) {
417 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
418 pid = int(r0)
419 return
420 }
421
422 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
423
424 func Getppid() (ppid int) {
425 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
426 ppid = int(r0)
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func Getrlimit(resource int, rlim *Rlimit) (err error) {
433 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
434 if e1 != 0 {
435 err = e1
436 }
437 return
438 }
439
440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
441
442 func Getrusage(who int, rusage *Rusage) (err error) {
443 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
444 if e1 != 0 {
445 err = e1
446 }
447 return
448 }
449
450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
451
452 func Gettid() (tid int) {
453 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
454 tid = int(r0)
455 return
456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
459
460 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
461 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(StringBytePtr(pathname))), uintptr(mask))
462 watchdesc = int(r0)
463 if e1 != 0 {
464 err = e1
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func InotifyInit() (fd int, err error) {
472 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
473 fd = int(r0)
474 if e1 != 0 {
475 err = e1
476 }
477 return
478 }
479
480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
481
482 func InotifyInit1(flags int) (fd int, err error) {
483 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
484 fd = int(r0)
485 if e1 != 0 {
486 err = e1
487 }
488 return
489 }
490
491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
492
493 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
494 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
495 success = int(r0)
496 if e1 != 0 {
497 err = e1
498 }
499 return
500 }
501
502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
503
504 func Kill(pid int, sig Signal) (err error) {
505 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
506 if e1 != 0 {
507 err = e1
508 }
509 return
510 }
511
512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
513
514 func Klogctl(typ int, buf []byte) (n int, err error) {
515 var _p0 unsafe.Pointer
516 if len(buf) > 0 {
517 _p0 = unsafe.Pointer(&buf[0])
518 } else {
519 _p0 = unsafe.Pointer(&_zero)
520 }
521 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
522 n = int(r0)
523 if e1 != 0 {
524 err = e1
525 }
526 return
527 }
528
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530
531 func Link(oldpath string, newpath string) (err error) {
532 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0)
533 if e1 != 0 {
534 err = e1
535 }
536 return
537 }
538
539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540
541 func Mkdir(path string, mode uint32) (err error) {
542 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0)
543 if e1 != 0 {
544 err = e1
545 }
546 return
547 }
548
549 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
550
551 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
552 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode))
553 if e1 != 0 {
554 err = e1
555 }
556 return
557 }
558
559 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
560
561 func Mknod(path string, mode uint32, dev int) (err error) {
562 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev))
563 if e1 != 0 {
564 err = e1
565 }
566 return
567 }
568
569 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
570
571 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
572 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0)
573 if e1 != 0 {
574 err = e1
575 }
576 return
577 }
578
579 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
580
581 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
582 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
583 if e1 != 0 {
584 err = e1
585 }
586 return
587 }
588
589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
590
591 func Pause() (err error) {
592 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
593 if e1 != 0 {
594 err = e1
595 }
596 return
597 }
598
599 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
600
601 func PivotRoot(newroot string, putold string) (err error) {
602 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0)
603 if e1 != 0 {
604 err = e1
605 }
606 return
607 }
608
609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
610
611 func Read(fd int, p []byte) (n int, err error) {
612 var _p0 unsafe.Pointer
613 if len(p) > 0 {
614 _p0 = unsafe.Pointer(&p[0])
615 } else {
616 _p0 = unsafe.Pointer(&_zero)
617 }
618 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
619 n = int(r0)
620 if e1 != 0 {
621 err = e1
622 }
623 return
624 }
625
626 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
627
628 func Readlink(path string, buf []byte) (n int, err error) {
629 var _p0 unsafe.Pointer
630 if len(buf) > 0 {
631 _p0 = unsafe.Pointer(&buf[0])
632 } else {
633 _p0 = unsafe.Pointer(&_zero)
634 }
635 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(_p0), uintptr(len(buf)))
636 n = int(r0)
637 if e1 != 0 {
638 err = e1
639 }
640 return
641 }
642
643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
644
645 func Rename(oldpath string, newpath string) (err error) {
646 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0)
647 if e1 != 0 {
648 err = e1
649 }
650 return
651 }
652
653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
654
655 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
656 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0)
657 if e1 != 0 {
658 err = e1
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
665 func Rmdir(path string) (err error) {
666 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0)
667 if e1 != 0 {
668 err = e1
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Setdomainname(p []byte) (err error) {
676 var _p0 unsafe.Pointer
677 if len(p) > 0 {
678 _p0 = unsafe.Pointer(&p[0])
679 } else {
680 _p0 = unsafe.Pointer(&_zero)
681 }
682 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
683 if e1 != 0 {
684 err = e1
685 }
686 return
687 }
688
689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
690
691 func Sethostname(p []byte) (err error) {
692 var _p0 unsafe.Pointer
693 if len(p) > 0 {
694 _p0 = unsafe.Pointer(&p[0])
695 } else {
696 _p0 = unsafe.Pointer(&_zero)
697 }
698 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
699 if e1 != 0 {
700 err = e1
701 }
702 return
703 }
704
705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
706
707 func Setpgid(pid int, pgid int) (err error) {
708 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
709 if e1 != 0 {
710 err = e1
711 }
712 return
713 }
714
715 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
716
717 func Setrlimit(resource int, rlim *Rlimit) (err error) {
718 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
719 if e1 != 0 {
720 err = e1
721 }
722 return
723 }
724
725 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
726
727 func Setsid() (pid int, err error) {
728 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
729 pid = int(r0)
730 if e1 != 0 {
731 err = e1
732 }
733 return
734 }
735
736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
737
738 func Settimeofday(tv *Timeval) (err error) {
739 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
740 if e1 != 0 {
741 err = e1
742 }
743 return
744 }
745
746 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
747
748 func Setuid(uid int) (err error) {
749 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
750 if e1 != 0 {
751 err = e1
752 }
753 return
754 }
755
756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
757
758 func Symlink(oldpath string, newpath string) (err error) {
759 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0)
760 if e1 != 0 {
761 err = e1
762 }
763 return
764 }
765
766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
767
768 func Sync() {
769 Syscall(SYS_SYNC, 0, 0, 0)
770 return
771 }
772
773 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
774
775 func Sysinfo(info *Sysinfo_t) (err error) {
776 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
777 if e1 != 0 {
778 err = e1
779 }
780 return
781 }
782
783 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
784
785 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
786 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
787 n = int64(r0)
788 if e1 != 0 {
789 err = e1
790 }
791 return
792 }
793
794 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
795
796 func Tgkill(tgid int, tid int, sig Signal) (err error) {
797 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
798 if e1 != 0 {
799 err = e1
800 }
801 return
802 }
803
804 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
805
806 func Times(tms *Tms) (ticks uintptr, err error) {
807 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
808 ticks = uintptr(r0)
809 if e1 != 0 {
810 err = e1
811 }
812 return
813 }
814
815 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816
817 func Umask(mask int) (oldmask int) {
818 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
819 oldmask = int(r0)
820 return
821 }
822
823 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
824
825 func Uname(buf *Utsname) (err error) {
826 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
827 if e1 != 0 {
828 err = e1
829 }
830 return
831 }
832
833 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
834
835 func Unlink(path string) (err error) {
836 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0)
837 if e1 != 0 {
838 err = e1
839 }
840 return
841 }
842
843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
844
845 func Unlinkat(dirfd int, path string) (err error) {
846 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0)
847 if e1 != 0 {
848 err = e1
849 }
850 return
851 }
852
853 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
854
855 func Unmount(target string, flags int) (err error) {
856 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(flags), 0)
857 if e1 != 0 {
858 err = e1
859 }
860 return
861 }
862
863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
864
865 func Unshare(flags int) (err error) {
866 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
867 if e1 != 0 {
868 err = e1
869 }
870 return
871 }
872
873 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
874
875 func Ustat(dev int, ubuf *Ustat_t) (err error) {
876 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
877 if e1 != 0 {
878 err = e1
879 }
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Utime(path string, buf *Utimbuf) (err error) {
886 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0)
887 if e1 != 0 {
888 err = e1
889 }
890 return
891 }
892
893 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
894
895 func Write(fd int, p []byte) (n int, err error) {
896 var _p0 unsafe.Pointer
897 if len(p) > 0 {
898 _p0 = unsafe.Pointer(&p[0])
899 } else {
900 _p0 = unsafe.Pointer(&_zero)
901 }
902 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
903 n = int(r0)
904 if e1 != 0 {
905 err = e1
906 }
907 return
908 }
909
910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
911
912 func exitThread(code int) (err error) {
913 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
914 if e1 != 0 {
915 err = e1
916 }
917 return
918 }
919
920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
921
922 func read(fd int, p *byte, np int) (n int, err error) {
923 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
924 n = int(r0)
925 if e1 != 0 {
926 err = e1
927 }
928 return
929 }
930
931 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
932
933 func write(fd int, p *byte, np int) (n int, err error) {
934 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
935 n = int(r0)
936 if e1 != 0 {
937 err = e1
938 }
939 return
940 }
941
942 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
943
944 func munmap(addr uintptr, length uintptr) (err error) {
945 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
946 if e1 != 0 {
947 err = e1
948 }
949 return
950 }
951
952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
953
954 func Madvise(b []byte, advice int) (err error) {
955 var _p0 unsafe.Pointer
956 if len(b) > 0 {
957 _p0 = unsafe.Pointer(&b[0])
958 } else {
959 _p0 = unsafe.Pointer(&_zero)
960 }
961 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
962 if e1 != 0 {
963 err = e1
964 }
965 return
966 }
967
968 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
969
970 func Mprotect(b []byte, prot int) (err error) {
971 var _p0 unsafe.Pointer
972 if len(b) > 0 {
973 _p0 = unsafe.Pointer(&b[0])
974 } else {
975 _p0 = unsafe.Pointer(&_zero)
976 }
977 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
978 if e1 != 0 {
979 err = e1
980 }
981 return
982 }
983
984 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
985
986 func Mlock(b []byte) (err error) {
987 var _p0 unsafe.Pointer
988 if len(b) > 0 {
989 _p0 = unsafe.Pointer(&b[0])
990 } else {
991 _p0 = unsafe.Pointer(&_zero)
992 }
993 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
994 if e1 != 0 {
995 err = e1
996 }
997 return
998 }
999
1000 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1001
1002 func Munlock(b []byte) (err error) {
1003 var _p0 unsafe.Pointer
1004 if len(b) > 0 {
1005 _p0 = unsafe.Pointer(&b[0])
1006 } else {
1007 _p0 = unsafe.Pointer(&_zero)
1008 }
1009 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
1010 if e1 != 0 {
1011 err = e1
1012 }
1013 return
1014 }
1015
1016 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1017
1018 func Mlockall(flags int) (err error) {
1019 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
1020 if e1 != 0 {
1021 err = e1
1022 }
1023 return
1024 }
1025
1026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1027
1028 func Munlockall() (err error) {
1029 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
1030 if e1 != 0 {
1031 err = e1
1032 }
1033 return
1034 }
1035
1036 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1037
1038 func Chown(path string, uid int, gid int) (err error) {
1039 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
1040 if e1 != 0 {
1041 err = e1
1042 }
1043 return
1044 }
1045
1046 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1047
1048 func Fchown(fd int, uid int, gid int) (err error) {
1049 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
1050 if e1 != 0 {
1051 err = e1
1052 }
1053 return
1054 }
1055
1056 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1057
1058 func Fstat(fd int, stat *Stat_t) (err error) {
1059 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1060 if e1 != 0 {
1061 err = e1
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
1068 func Fstatfs(fd int, buf *Statfs_t) (err error) {
1069 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
1070 if e1 != 0 {
1071 err = e1
1072 }
1073 return
1074 }
1075
1076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1077
1078 func Ftruncate(fd int, length int64) (err error) {
1079 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
1080 if e1 != 0 {
1081 err = e1
1082 }
1083 return
1084 }
1085
1086 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1087
1088 func Getegid() (egid int) {
1089 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1090 egid = int(r0)
1091 return
1092 }
1093
1094 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1095
1096 func Geteuid() (euid int) {
1097 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1098 euid = int(r0)
1099 return
1100 }
1101
1102 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1103
1104 func Getgid() (gid int) {
1105 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1106 gid = int(r0)
1107 return
1108 }
1109
1110 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1111
1112 func Getuid() (uid int) {
1113 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1114 uid = int(r0)
1115 return
1116 }
1117
1118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1119
1120 func Ioperm(from int, num int, on int) (err error) {
1121 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
1122 if e1 != 0 {
1123 err = e1
1124 }
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func Iopl(level int) (err error) {
1131 _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
1132 if e1 != 0 {
1133 err = e1
1134 }
1135 return
1136 }
1137
1138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1139
1140 func Lchown(path string, uid int, gid int) (err error) {
1141 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
1142 if e1 != 0 {
1143 err = e1
1144 }
1145 return
1146 }
1147
1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1149
1150 func Listen(s int, n int) (err error) {
1151 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
1152 if e1 != 0 {
1153 err = e1
1154 }
1155 return
1156 }
1157
1158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1159
1160 func Lstat(path string, stat *Stat_t) (err error) {
1161 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
1162 if e1 != 0 {
1163 err = e1
1164 }
1165 return
1166 }
1167
1168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1169
1170 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1171 var _p0 unsafe.Pointer
1172 if len(p) > 0 {
1173 _p0 = unsafe.Pointer(&p[0])
1174 } else {
1175 _p0 = unsafe.Pointer(&_zero)
1176 }
1177 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1178 n = int(r0)
1179 if e1 != 0 {
1180 err = e1
1181 }
1182 return
1183 }
1184
1185 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1186
1187 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1188 var _p0 unsafe.Pointer
1189 if len(p) > 0 {
1190 _p0 = unsafe.Pointer(&p[0])
1191 } else {
1192 _p0 = unsafe.Pointer(&_zero)
1193 }
1194 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1195 n = int(r0)
1196 if e1 != 0 {
1197 err = e1
1198 }
1199 return
1200 }
1201
1202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1203
1204 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1205 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1206 off = int64(r0)
1207 if e1 != 0 {
1208 err = e1
1209 }
1210 return
1211 }
1212
1213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1214
1215 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
1216 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1217 n = int(r0)
1218 if e1 != 0 {
1219 err = e1
1220 }
1221 return
1222 }
1223
1224 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1225
1226 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1227 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
1228 written = int(r0)
1229 if e1 != 0 {
1230 err = e1
1231 }
1232 return
1233 }
1234
1235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1236
1237 func Setfsgid(gid int) (err error) {
1238 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
1239 if e1 != 0 {
1240 err = e1
1241 }
1242 return
1243 }
1244
1245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1246
1247 func Setfsuid(uid int) (err error) {
1248 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
1249 if e1 != 0 {
1250 err = e1
1251 }
1252 return
1253 }
1254
1255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1256
1257 func Setgid(gid int) (err error) {
1258 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1259 if e1 != 0 {
1260 err = e1
1261 }
1262 return
1263 }
1264
1265 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1266
1267 func Setregid(rgid int, egid int) (err error) {
1268 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1269 if e1 != 0 {
1270 err = e1
1271 }
1272 return
1273 }
1274
1275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1276
1277 func Setresgid(rgid int, egid int, sgid int) (err error) {
1278 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
1279 if e1 != 0 {
1280 err = e1
1281 }
1282 return
1283 }
1284
1285 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1286
1287 func Setresuid(ruid int, euid int, suid int) (err error) {
1288 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
1289 if e1 != 0 {
1290 err = e1
1291 }
1292 return
1293 }
1294
1295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1296
1297 func Setreuid(ruid int, euid int) (err error) {
1298 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1299 if e1 != 0 {
1300 err = e1
1301 }
1302 return
1303 }
1304
1305 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1306
1307 func Shutdown(fd int, how int) (err error) {
1308 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
1309 if e1 != 0 {
1310 err = e1
1311 }
1312 return
1313 }
1314
1315 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1316
1317 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1318 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1319 n = int64(r0)
1320 if e1 != 0 {
1321 err = e1
1322 }
1323 return
1324 }
1325
1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327
1328 func Stat(path string, stat *Stat_t) (err error) {
1329 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
1330 if e1 != 0 {
1331 err = e1
1332 }
1333 return
1334 }
1335
1336 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1337
1338 func Statfs(path string, buf *Statfs_t) (err error) {
1339 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0)
1340 if e1 != 0 {
1341 err = e1
1342 }
1343 return
1344 }
1345
1346 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1347
1348 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
1349 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
1350 if e1 != 0 {
1351 err = e1
1352 }
1353 return
1354 }
1355
1356 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1357
1358 func Truncate(path string, length int64) (err error) {
1359 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), 0)
1360 if e1 != 0 {
1361 err = e1
1362 }
1363 return
1364 }
1365
1366 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1367
1368 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
1369 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1370 fd = int(r0)
1371 if e1 != 0 {
1372 err = e1
1373 }
1374 return
1375 }
1376
1377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1378
1379 func bind(s int, addr uintptr, addrlen _Socklen) (err error) {
1380 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
1381 if e1 != 0 {
1382 err = e1
1383 }
1384 return
1385 }
1386
1387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1388
1389 func connect(s int, addr uintptr, addrlen _Socklen) (err error) {
1390 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
1391 if e1 != 0 {
1392 err = e1
1393 }
1394 return
1395 }
1396
1397 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1398
1399 func getgroups(n int, list *_Gid_t) (nn int, err error) {
1400 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
1401 nn = int(r0)
1402 if e1 != 0 {
1403 err = e1
1404 }
1405 return
1406 }
1407
1408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1409
1410 func setgroups(n int, list *_Gid_t) (err error) {
1411 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
1412 if e1 != 0 {
1413 err = e1
1414 }
1415 return
1416 }
1417
1418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1419
1420 func getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) {
1421 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
1422 if e1 != 0 {
1423 err = e1
1424 }
1425 return
1426 }
1427
1428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1429
1430 func setsockopt(s int, level int, name int, val uintptr, vallen uintptr) (err error) {
1431 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
1432 if e1 != 0 {
1433 err = e1
1434 }
1435 return
1436 }
1437
1438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1439
1440 func socket(domain int, typ int, proto int) (fd int, err error) {
1441 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
1442 fd = int(r0)
1443 if e1 != 0 {
1444 err = e1
1445 }
1446 return
1447 }
1448
1449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1450
1451 func socketpair(domain int, typ int, proto int, fd *[2]int) (err error) {
1452 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
1453 if e1 != 0 {
1454 err = e1
1455 }
1456 return
1457 }
1458
1459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1460
1461 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1462 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1463 if e1 != 0 {
1464 err = e1
1465 }
1466 return
1467 }
1468
1469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1470
1471 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1472 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1473 if e1 != 0 {
1474 err = e1
1475 }
1476 return
1477 }
1478
1479 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1480
1481 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
1482 var _p0 unsafe.Pointer
1483 if len(p) > 0 {
1484 _p0 = unsafe.Pointer(&p[0])
1485 } else {
1486 _p0 = unsafe.Pointer(&_zero)
1487 }
1488 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
1489 n = int(r0)
1490 if e1 != 0 {
1491 err = e1
1492 }
1493 return
1494 }
1495
1496 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1497
1498 func sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (err error) {
1499 var _p0 unsafe.Pointer
1500 if len(buf) > 0 {
1501 _p0 = unsafe.Pointer(&buf[0])
1502 } else {
1503 _p0 = unsafe.Pointer(&_zero)
1504 }
1505 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
1506 if e1 != 0 {
1507 err = e1
1508 }
1509 return
1510 }
1511
1512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1513
1514 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
1515 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
1516 n = int(r0)
1517 if e1 != 0 {
1518 err = e1
1519 }
1520 return
1521 }
1522
1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1524
1525 func sendmsg(s int, msg *Msghdr, flags int) (err error) {
1526 _, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
1527 if e1 != 0 {
1528 err = e1
1529 }
1530 return
1531 }
1532
1533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1534
1535 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
1536 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
1537 xaddr = uintptr(r0)
1538 if e1 != 0 {
1539 err = e1
1540 }
1541 return
1542 }