Source file
src/syscall/zsyscall_darwin_arm64.go
1
2
3
4
5
6 package syscall
7
8 import "unsafe"
9 import "internal/abi"
10 import "runtime"
11
12
13
14 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
15 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
16 n = int(r0)
17 if e1 != 0 {
18 err = errnoErr(e1)
19 }
20 return
21 }
22
23 func libc_getgroups_trampoline()
24
25
26
27
28
29 func setgroups(ngid int, gid *_Gid_t) (err error) {
30 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
31 if e1 != 0 {
32 err = errnoErr(e1)
33 }
34 return
35 }
36
37 func libc_setgroups_trampoline()
38
39
40
41
42
43 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
44 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
45 wpid = int(r0)
46 if e1 != 0 {
47 err = errnoErr(e1)
48 }
49 return
50 }
51
52 func libc_wait4_trampoline()
53
54
55
56
57
58 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
59 r0, _, e1 := syscall(abi.FuncPCABI0(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
60 fd = int(r0)
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 func libc_accept_trampoline()
68
69
70
71
72
73 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
74 _, _, e1 := syscall(abi.FuncPCABI0(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
75 if e1 != 0 {
76 err = errnoErr(e1)
77 }
78 return
79 }
80
81 func libc_bind_trampoline()
82
83
84
85
86
87 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
88 _, _, e1 := syscall(abi.FuncPCABI0(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
89 if e1 != 0 {
90 err = errnoErr(e1)
91 }
92 return
93 }
94
95 func libc_connect_trampoline()
96
97
98
99
100
101 func socket(domain int, typ int, proto int) (fd int, err error) {
102 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
103 fd = int(r0)
104 if e1 != 0 {
105 err = errnoErr(e1)
106 }
107 return
108 }
109
110 func libc_socket_trampoline()
111
112
113
114
115
116 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
117 _, _, e1 := syscall6(abi.FuncPCABI0(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
118 if e1 != 0 {
119 err = errnoErr(e1)
120 }
121 return
122 }
123
124 func libc_getsockopt_trampoline()
125
126
127
128
129
130 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
131 _, _, e1 := syscall6(abi.FuncPCABI0(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 func libc_setsockopt_trampoline()
139
140
141
142
143
144 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
145 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
146 if e1 != 0 {
147 err = errnoErr(e1)
148 }
149 return
150 }
151
152 func libc_getpeername_trampoline()
153
154
155
156
157
158 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
159 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
160 if e1 != 0 {
161 err = errnoErr(e1)
162 }
163 return
164 }
165
166 func libc_getsockname_trampoline()
167
168
169
170
171
172 func Shutdown(s int, how int) (err error) {
173 _, _, e1 := syscall(abi.FuncPCABI0(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
174 if e1 != 0 {
175 err = errnoErr(e1)
176 }
177 return
178 }
179
180 func libc_shutdown_trampoline()
181
182
183
184
185
186 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
187 _, _, e1 := rawSyscall6(abi.FuncPCABI0(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
188 if e1 != 0 {
189 err = errnoErr(e1)
190 }
191 return
192 }
193
194 func libc_socketpair_trampoline()
195
196
197
198
199
200 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
201 var _p0 unsafe.Pointer
202 if len(p) > 0 {
203 _p0 = unsafe.Pointer(&p[0])
204 } else {
205 _p0 = unsafe.Pointer(&_zero)
206 }
207 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
208 n = int(r0)
209 if e1 != 0 {
210 err = errnoErr(e1)
211 }
212 return
213 }
214
215 func libc_recvfrom_trampoline()
216
217
218
219
220
221 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
222 var _p0 unsafe.Pointer
223 if len(buf) > 0 {
224 _p0 = unsafe.Pointer(&buf[0])
225 } else {
226 _p0 = unsafe.Pointer(&_zero)
227 }
228 _, _, e1 := syscall6(abi.FuncPCABI0(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
229 if e1 != 0 {
230 err = errnoErr(e1)
231 }
232 return
233 }
234
235 func libc_sendto_trampoline()
236
237
238
239
240
241 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
242 r0, _, e1 := syscall(abi.FuncPCABI0(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
243 n = int(r0)
244 if e1 != 0 {
245 err = errnoErr(e1)
246 }
247 return
248 }
249
250 func libc_recvmsg_trampoline()
251
252
253
254
255
256 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
257 r0, _, e1 := syscall(abi.FuncPCABI0(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
258 n = int(r0)
259 if e1 != 0 {
260 err = errnoErr(e1)
261 }
262 return
263 }
264
265 func libc_sendmsg_trampoline()
266
267
268
269
270
271 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
272 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
273 n = int(r0)
274 if e1 != 0 {
275 err = errnoErr(e1)
276 }
277 return
278 }
279
280 func libc_kevent_trampoline()
281
282
283
284
285
286 func utimes(path string, timeval *[2]Timeval) (err error) {
287 var _p0 *byte
288 _p0, err = BytePtrFromString(path)
289 if err != nil {
290 return
291 }
292 _, _, e1 := syscall(abi.FuncPCABI0(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
293 if e1 != 0 {
294 err = errnoErr(e1)
295 }
296 return
297 }
298
299 func libc_utimes_trampoline()
300
301
302
303
304
305 func futimes(fd int, timeval *[2]Timeval) (err error) {
306 _, _, e1 := syscall(abi.FuncPCABI0(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
307 if e1 != 0 {
308 err = errnoErr(e1)
309 }
310 return
311 }
312
313 func libc_futimes_trampoline()
314
315
316
317
318
319 func fcntl(fd int, cmd int, arg int) (val int, err error) {
320 r0, _, e1 := syscall(abi.FuncPCABI0(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
321 val = int(r0)
322 if e1 != 0 {
323 err = errnoErr(e1)
324 }
325 return
326 }
327
328 func libc_fcntl_trampoline()
329
330
331
332
333
334 func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (val int, err error) {
335 r0, _, e1 := syscall(abi.FuncPCABI0(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
336 val = int(r0)
337 if e1 != 0 {
338 err = errnoErr(e1)
339 }
340 return
341 }
342
343
344
345 func ioctl(fd int, req int, arg int) (err error) {
346 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
347 if e1 != 0 {
348 err = errnoErr(e1)
349 }
350 return
351 }
352
353 func libc_ioctl_trampoline()
354
355
356
357
358
359 func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
360 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367
368
369 func pipe(p *[2]int32) (err error) {
370 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 func libc_pipe_trampoline()
378
379
380
381
382
383 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
384 var _p0 *byte
385 _p0, err = BytePtrFromString(path)
386 if err != nil {
387 return
388 }
389 _, _, e1 := syscall6(abi.FuncPCABI0(libc_utimensat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
390 if e1 != 0 {
391 err = errnoErr(e1)
392 }
393 return
394 }
395
396 func libc_utimensat_trampoline()
397
398
399
400
401
402 func kill(pid int, signum int, posix int) (err error) {
403 _, _, e1 := syscall(abi.FuncPCABI0(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
404 if e1 != 0 {
405 err = errnoErr(e1)
406 }
407 return
408 }
409
410 func libc_kill_trampoline()
411
412
413
414
415
416 func Access(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := syscall(abi.FuncPCABI0(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_access_trampoline()
430
431
432
433
434
435 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
436 _, _, e1 := syscall(abi.FuncPCABI0(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
437 if e1 != 0 {
438 err = errnoErr(e1)
439 }
440 return
441 }
442
443 func libc_adjtime_trampoline()
444
445
446
447
448
449 func Chdir(path string) (err error) {
450 var _p0 *byte
451 _p0, err = BytePtrFromString(path)
452 if err != nil {
453 return
454 }
455 _, _, e1 := syscall(abi.FuncPCABI0(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
456 if e1 != 0 {
457 err = errnoErr(e1)
458 }
459 return
460 }
461
462 func libc_chdir_trampoline()
463
464
465
466
467
468 func Chflags(path string, flags int) (err error) {
469 var _p0 *byte
470 _p0, err = BytePtrFromString(path)
471 if err != nil {
472 return
473 }
474 _, _, e1 := syscall(abi.FuncPCABI0(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
475 if e1 != 0 {
476 err = errnoErr(e1)
477 }
478 return
479 }
480
481 func libc_chflags_trampoline()
482
483
484
485
486
487 func Chmod(path string, mode uint32) (err error) {
488 var _p0 *byte
489 _p0, err = BytePtrFromString(path)
490 if err != nil {
491 return
492 }
493 _, _, e1 := syscall(abi.FuncPCABI0(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
494 if e1 != 0 {
495 err = errnoErr(e1)
496 }
497 return
498 }
499
500 func libc_chmod_trampoline()
501
502
503
504
505
506 func Chown(path string, uid int, gid int) (err error) {
507 var _p0 *byte
508 _p0, err = BytePtrFromString(path)
509 if err != nil {
510 return
511 }
512 _, _, e1 := syscall(abi.FuncPCABI0(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
513 if e1 != 0 {
514 err = errnoErr(e1)
515 }
516 return
517 }
518
519 func libc_chown_trampoline()
520
521
522
523
524
525 func Chroot(path string) (err error) {
526 var _p0 *byte
527 _p0, err = BytePtrFromString(path)
528 if err != nil {
529 return
530 }
531 _, _, e1 := syscall(abi.FuncPCABI0(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
532 if e1 != 0 {
533 err = errnoErr(e1)
534 }
535 return
536 }
537
538 func libc_chroot_trampoline()
539
540
541
542
543
544 func Close(fd int) (err error) {
545 _, _, e1 := syscall(abi.FuncPCABI0(libc_close_trampoline), uintptr(fd), 0, 0)
546 if e1 != 0 {
547 err = errnoErr(e1)
548 }
549 return
550 }
551
552 func libc_close_trampoline()
553
554
555
556
557
558 func closedir(dir uintptr) (err error) {
559 _, _, e1 := syscall(abi.FuncPCABI0(libc_closedir_trampoline), uintptr(dir), 0, 0)
560 if e1 != 0 {
561 err = errnoErr(e1)
562 }
563 return
564 }
565
566 func libc_closedir_trampoline()
567
568
569
570
571
572 func Dup(fd int) (nfd int, err error) {
573 r0, _, e1 := syscall(abi.FuncPCABI0(libc_dup_trampoline), uintptr(fd), 0, 0)
574 nfd = int(r0)
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
580
581 func libc_dup_trampoline()
582
583
584
585
586
587 func Dup2(from int, to int) (err error) {
588 _, _, e1 := syscall(abi.FuncPCABI0(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 func libc_dup2_trampoline()
596
597
598
599
600
601 func Exchangedata(path1 string, path2 string, options int) (err error) {
602 var _p0 *byte
603 _p0, err = BytePtrFromString(path1)
604 if err != nil {
605 return
606 }
607 var _p1 *byte
608 _p1, err = BytePtrFromString(path2)
609 if err != nil {
610 return
611 }
612 _, _, e1 := syscall(abi.FuncPCABI0(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
613 if e1 != 0 {
614 err = errnoErr(e1)
615 }
616 return
617 }
618
619 func libc_exchangedata_trampoline()
620
621
622
623
624
625 func Fchdir(fd int) (err error) {
626 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchdir_trampoline), uintptr(fd), 0, 0)
627 if e1 != 0 {
628 err = errnoErr(e1)
629 }
630 return
631 }
632
633 func libc_fchdir_trampoline()
634
635
636
637
638
639 func Fchflags(fd int, flags int) (err error) {
640 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
641 if e1 != 0 {
642 err = errnoErr(e1)
643 }
644 return
645 }
646
647 func libc_fchflags_trampoline()
648
649
650
651
652
653 func Fchmod(fd int, mode uint32) (err error) {
654 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fchmod_trampoline()
662
663
664
665
666
667 func Fchown(fd int, uid int, gid int) (err error) {
668 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
669 if e1 != 0 {
670 err = errnoErr(e1)
671 }
672 return
673 }
674
675 func libc_fchown_trampoline()
676
677
678
679
680
681 func Flock(fd int, how int) (err error) {
682 _, _, e1 := syscall(abi.FuncPCABI0(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
683 if e1 != 0 {
684 err = errnoErr(e1)
685 }
686 return
687 }
688
689 func libc_flock_trampoline()
690
691
692
693
694
695 func Fpathconf(fd int, name int) (val int, err error) {
696 r0, _, e1 := syscall(abi.FuncPCABI0(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
697 val = int(r0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 func libc_fpathconf_trampoline()
705
706
707
708
709
710 func Fsync(fd int) (err error) {
711 _, _, e1 := syscall(abi.FuncPCABI0(libc_fsync_trampoline), uintptr(fd), 0, 0)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 func libc_fsync_trampoline()
719
720
721
722
723
724 func Ftruncate(fd int, length int64) (err error) {
725 _, _, e1 := syscall(abi.FuncPCABI0(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
726 if e1 != 0 {
727 err = errnoErr(e1)
728 }
729 return
730 }
731
732 func libc_ftruncate_trampoline()
733
734
735
736
737
738 func Getdtablesize() (size int) {
739 r0, _, _ := syscall(abi.FuncPCABI0(libc_getdtablesize_trampoline), 0, 0, 0)
740 size = int(r0)
741 return
742 }
743
744 func libc_getdtablesize_trampoline()
745
746
747
748
749
750 func Getegid() (egid int) {
751 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getegid_trampoline), 0, 0, 0)
752 egid = int(r0)
753 return
754 }
755
756 func libc_getegid_trampoline()
757
758
759
760
761
762 func Geteuid() (uid int) {
763 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_geteuid_trampoline), 0, 0, 0)
764 uid = int(r0)
765 return
766 }
767
768 func libc_geteuid_trampoline()
769
770
771
772
773
774 func Getgid() (gid int) {
775 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getgid_trampoline), 0, 0, 0)
776 gid = int(r0)
777 return
778 }
779
780 func libc_getgid_trampoline()
781
782
783
784
785
786 func Getpgid(pid int) (pgid int, err error) {
787 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getpgid_trampoline), uintptr(pid), 0, 0)
788 pgid = int(r0)
789 if e1 != 0 {
790 err = errnoErr(e1)
791 }
792 return
793 }
794
795 func libc_getpgid_trampoline()
796
797
798
799
800
801 func Getpgrp() (pgrp int) {
802 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getpgrp_trampoline), 0, 0, 0)
803 pgrp = int(r0)
804 return
805 }
806
807 func libc_getpgrp_trampoline()
808
809
810
811
812
813 func Getpid() (pid int) {
814 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getpid_trampoline), 0, 0, 0)
815 pid = int(r0)
816 return
817 }
818
819 func libc_getpid_trampoline()
820
821
822
823
824
825 func Getppid() (ppid int) {
826 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getppid_trampoline), 0, 0, 0)
827 ppid = int(r0)
828 return
829 }
830
831 func libc_getppid_trampoline()
832
833
834
835
836
837 func Getpriority(which int, who int) (prio int, err error) {
838 r0, _, e1 := syscall(abi.FuncPCABI0(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
839 prio = int(r0)
840 if e1 != 0 {
841 err = errnoErr(e1)
842 }
843 return
844 }
845
846 func libc_getpriority_trampoline()
847
848
849
850
851
852 func Getrlimit(which int, lim *Rlimit) (err error) {
853 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
854 if e1 != 0 {
855 err = errnoErr(e1)
856 }
857 return
858 }
859
860 func libc_getrlimit_trampoline()
861
862
863
864
865
866 func Getrusage(who int, rusage *Rusage) (err error) {
867 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
868 if e1 != 0 {
869 err = errnoErr(e1)
870 }
871 return
872 }
873
874 func libc_getrusage_trampoline()
875
876
877
878
879
880 func Getsid(pid int) (sid int, err error) {
881 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getsid_trampoline), uintptr(pid), 0, 0)
882 sid = int(r0)
883 if e1 != 0 {
884 err = errnoErr(e1)
885 }
886 return
887 }
888
889 func libc_getsid_trampoline()
890
891
892
893
894
895 func Getuid() (uid int) {
896 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getuid_trampoline), 0, 0, 0)
897 uid = int(r0)
898 return
899 }
900
901 func libc_getuid_trampoline()
902
903
904
905
906
907 func Issetugid() (tainted bool) {
908 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_issetugid_trampoline), 0, 0, 0)
909 tainted = bool(r0 != 0)
910 return
911 }
912
913 func libc_issetugid_trampoline()
914
915
916
917
918
919 func Kqueue() (fd int, err error) {
920 r0, _, e1 := syscall(abi.FuncPCABI0(libc_kqueue_trampoline), 0, 0, 0)
921 fd = int(r0)
922 if e1 != 0 {
923 err = errnoErr(e1)
924 }
925 return
926 }
927
928 func libc_kqueue_trampoline()
929
930
931
932
933
934 func Lchown(path string, uid int, gid int) (err error) {
935 var _p0 *byte
936 _p0, err = BytePtrFromString(path)
937 if err != nil {
938 return
939 }
940 _, _, e1 := syscall(abi.FuncPCABI0(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
941 if e1 != 0 {
942 err = errnoErr(e1)
943 }
944 return
945 }
946
947 func libc_lchown_trampoline()
948
949
950
951
952
953 func Link(path string, link string) (err error) {
954 var _p0 *byte
955 _p0, err = BytePtrFromString(path)
956 if err != nil {
957 return
958 }
959 var _p1 *byte
960 _p1, err = BytePtrFromString(link)
961 if err != nil {
962 return
963 }
964 _, _, e1 := syscall(abi.FuncPCABI0(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
965 if e1 != 0 {
966 err = errnoErr(e1)
967 }
968 return
969 }
970
971 func libc_link_trampoline()
972
973
974
975
976
977 func Listen(s int, backlog int) (err error) {
978 _, _, e1 := syscall(abi.FuncPCABI0(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
979 if e1 != 0 {
980 err = errnoErr(e1)
981 }
982 return
983 }
984
985 func libc_listen_trampoline()
986
987
988
989
990
991 func Mkdir(path string, mode uint32) (err error) {
992 var _p0 *byte
993 _p0, err = BytePtrFromString(path)
994 if err != nil {
995 return
996 }
997 _, _, e1 := syscall(abi.FuncPCABI0(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
998 if e1 != 0 {
999 err = errnoErr(e1)
1000 }
1001 return
1002 }
1003
1004 func libc_mkdir_trampoline()
1005
1006
1007
1008
1009
1010 func Mkfifo(path string, mode uint32) (err error) {
1011 var _p0 *byte
1012 _p0, err = BytePtrFromString(path)
1013 if err != nil {
1014 return
1015 }
1016 _, _, e1 := syscall(abi.FuncPCABI0(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1017 if e1 != 0 {
1018 err = errnoErr(e1)
1019 }
1020 return
1021 }
1022
1023 func libc_mkfifo_trampoline()
1024
1025
1026
1027
1028
1029 func Mknod(path string, mode uint32, dev int) (err error) {
1030 var _p0 *byte
1031 _p0, err = BytePtrFromString(path)
1032 if err != nil {
1033 return
1034 }
1035 _, _, e1 := syscall(abi.FuncPCABI0(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1036 if e1 != 0 {
1037 err = errnoErr(e1)
1038 }
1039 return
1040 }
1041
1042 func libc_mknod_trampoline()
1043
1044
1045
1046
1047
1048 func Mlock(b []byte) (err error) {
1049 var _p0 unsafe.Pointer
1050 if len(b) > 0 {
1051 _p0 = unsafe.Pointer(&b[0])
1052 } else {
1053 _p0 = unsafe.Pointer(&_zero)
1054 }
1055 _, _, e1 := syscall(abi.FuncPCABI0(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
1056 if e1 != 0 {
1057 err = errnoErr(e1)
1058 }
1059 return
1060 }
1061
1062 func libc_mlock_trampoline()
1063
1064
1065
1066
1067
1068 func Mlockall(flags int) (err error) {
1069 _, _, e1 := syscall(abi.FuncPCABI0(libc_mlockall_trampoline), uintptr(flags), 0, 0)
1070 if e1 != 0 {
1071 err = errnoErr(e1)
1072 }
1073 return
1074 }
1075
1076 func libc_mlockall_trampoline()
1077
1078
1079
1080
1081
1082 func Mprotect(b []byte, prot int) (err error) {
1083 var _p0 unsafe.Pointer
1084 if len(b) > 0 {
1085 _p0 = unsafe.Pointer(&b[0])
1086 } else {
1087 _p0 = unsafe.Pointer(&_zero)
1088 }
1089 _, _, e1 := syscall(abi.FuncPCABI0(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 func libc_mprotect_trampoline()
1097
1098
1099
1100
1101
1102 func msync(b []byte, flags int) (err error) {
1103 var _p0 unsafe.Pointer
1104 if len(b) > 0 {
1105 _p0 = unsafe.Pointer(&b[0])
1106 } else {
1107 _p0 = unsafe.Pointer(&_zero)
1108 }
1109 _, _, e1 := syscall(abi.FuncPCABI0(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
1110 if e1 != 0 {
1111 err = errnoErr(e1)
1112 }
1113 return
1114 }
1115
1116 func libc_msync_trampoline()
1117
1118
1119
1120
1121
1122 func Munlock(b []byte) (err error) {
1123 var _p0 unsafe.Pointer
1124 if len(b) > 0 {
1125 _p0 = unsafe.Pointer(&b[0])
1126 } else {
1127 _p0 = unsafe.Pointer(&_zero)
1128 }
1129 _, _, e1 := syscall(abi.FuncPCABI0(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
1130 if e1 != 0 {
1131 err = errnoErr(e1)
1132 }
1133 return
1134 }
1135
1136 func libc_munlock_trampoline()
1137
1138
1139
1140
1141
1142 func Munlockall() (err error) {
1143 _, _, e1 := syscall(abi.FuncPCABI0(libc_munlockall_trampoline), 0, 0, 0)
1144 if e1 != 0 {
1145 err = errnoErr(e1)
1146 }
1147 return
1148 }
1149
1150 func libc_munlockall_trampoline()
1151
1152
1153
1154
1155
1156 func Open(path string, mode int, perm uint32) (fd int, err error) {
1157 var _p0 *byte
1158 _p0, err = BytePtrFromString(path)
1159 if err != nil {
1160 return
1161 }
1162 r0, _, e1 := syscall(abi.FuncPCABI0(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1163 fd = int(r0)
1164 if e1 != 0 {
1165 err = errnoErr(e1)
1166 }
1167 return
1168 }
1169
1170 func libc_open_trampoline()
1171
1172
1173
1174
1175
1176 func Pathconf(path string, name int) (val int, err error) {
1177 var _p0 *byte
1178 _p0, err = BytePtrFromString(path)
1179 if err != nil {
1180 return
1181 }
1182 r0, _, e1 := syscall(abi.FuncPCABI0(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1183 val = int(r0)
1184 if e1 != 0 {
1185 err = errnoErr(e1)
1186 }
1187 return
1188 }
1189
1190 func libc_pathconf_trampoline()
1191
1192
1193
1194
1195
1196 func pread(fd int, p []byte, offset int64) (n int, err error) {
1197 var _p0 unsafe.Pointer
1198 if len(p) > 0 {
1199 _p0 = unsafe.Pointer(&p[0])
1200 } else {
1201 _p0 = unsafe.Pointer(&_zero)
1202 }
1203 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1204 n = int(r0)
1205 if e1 != 0 {
1206 err = errnoErr(e1)
1207 }
1208 return
1209 }
1210
1211 func libc_pread_trampoline()
1212
1213
1214
1215
1216
1217 func pwrite(fd int, p []byte, offset int64) (n int, err error) {
1218 var _p0 unsafe.Pointer
1219 if len(p) > 0 {
1220 _p0 = unsafe.Pointer(&p[0])
1221 } else {
1222 _p0 = unsafe.Pointer(&_zero)
1223 }
1224 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1225 n = int(r0)
1226 if e1 != 0 {
1227 err = errnoErr(e1)
1228 }
1229 return
1230 }
1231
1232 func libc_pwrite_trampoline()
1233
1234
1235
1236
1237
1238 func read(fd int, p []byte) (n int, err error) {
1239 var _p0 unsafe.Pointer
1240 if len(p) > 0 {
1241 _p0 = unsafe.Pointer(&p[0])
1242 } else {
1243 _p0 = unsafe.Pointer(&_zero)
1244 }
1245 r0, _, e1 := syscall(abi.FuncPCABI0(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1246 n = int(r0)
1247 if e1 != 0 {
1248 err = errnoErr(e1)
1249 }
1250 return
1251 }
1252
1253 func libc_read_trampoline()
1254
1255
1256
1257
1258
1259 func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
1260 r0, _, _ := syscall(abi.FuncPCABI0(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
1261 res = Errno(r0)
1262 return
1263 }
1264
1265 func libc_readdir_r_trampoline()
1266
1267
1268
1269
1270
1271 func Readlink(path string, buf []byte) (n int, err error) {
1272 var _p0 *byte
1273 _p0, err = BytePtrFromString(path)
1274 if err != nil {
1275 return
1276 }
1277 var _p1 unsafe.Pointer
1278 if len(buf) > 0 {
1279 _p1 = unsafe.Pointer(&buf[0])
1280 } else {
1281 _p1 = unsafe.Pointer(&_zero)
1282 }
1283 r0, _, e1 := syscall(abi.FuncPCABI0(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1284 n = int(r0)
1285 if e1 != 0 {
1286 err = errnoErr(e1)
1287 }
1288 return
1289 }
1290
1291 func libc_readlink_trampoline()
1292
1293
1294
1295
1296
1297 func Rename(from string, to string) (err error) {
1298 var _p0 *byte
1299 _p0, err = BytePtrFromString(from)
1300 if err != nil {
1301 return
1302 }
1303 var _p1 *byte
1304 _p1, err = BytePtrFromString(to)
1305 if err != nil {
1306 return
1307 }
1308 _, _, e1 := syscall(abi.FuncPCABI0(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1309 if e1 != 0 {
1310 err = errnoErr(e1)
1311 }
1312 return
1313 }
1314
1315 func libc_rename_trampoline()
1316
1317
1318
1319
1320
1321 func Revoke(path string) (err error) {
1322 var _p0 *byte
1323 _p0, err = BytePtrFromString(path)
1324 if err != nil {
1325 return
1326 }
1327 _, _, e1 := syscall(abi.FuncPCABI0(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
1333
1334 func libc_revoke_trampoline()
1335
1336
1337
1338
1339
1340 func Rmdir(path string) (err error) {
1341 var _p0 *byte
1342 _p0, err = BytePtrFromString(path)
1343 if err != nil {
1344 return
1345 }
1346 _, _, e1 := syscall(abi.FuncPCABI0(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1347 if e1 != 0 {
1348 err = errnoErr(e1)
1349 }
1350 return
1351 }
1352
1353 func libc_rmdir_trampoline()
1354
1355
1356
1357
1358
1359 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1360 r0, _, e1 := syscallX(abi.FuncPCABI0(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
1361 newoffset = int64(r0)
1362 if e1 != 0 {
1363 err = errnoErr(e1)
1364 }
1365 return
1366 }
1367
1368 func libc_lseek_trampoline()
1369
1370
1371
1372
1373
1374 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1375 _, _, e1 := syscall6(abi.FuncPCABI0(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 func libc_select_trampoline()
1383
1384
1385
1386
1387
1388 func Setegid(egid int) (err error) {
1389 _, _, e1 := syscall(abi.FuncPCABI0(libc_setegid_trampoline), uintptr(egid), 0, 0)
1390 if e1 != 0 {
1391 err = errnoErr(e1)
1392 }
1393 return
1394 }
1395
1396 func libc_setegid_trampoline()
1397
1398
1399
1400
1401
1402 func Seteuid(euid int) (err error) {
1403 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1404 if e1 != 0 {
1405 err = errnoErr(e1)
1406 }
1407 return
1408 }
1409
1410 func libc_seteuid_trampoline()
1411
1412
1413
1414
1415
1416 func Setgid(gid int) (err error) {
1417 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setgid_trampoline), uintptr(gid), 0, 0)
1418 if e1 != 0 {
1419 err = errnoErr(e1)
1420 }
1421 return
1422 }
1423
1424 func libc_setgid_trampoline()
1425
1426
1427
1428
1429
1430 func Setlogin(name string) (err error) {
1431 var _p0 *byte
1432 _p0, err = BytePtrFromString(name)
1433 if err != nil {
1434 return
1435 }
1436 _, _, e1 := syscall(abi.FuncPCABI0(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1437 if e1 != 0 {
1438 err = errnoErr(e1)
1439 }
1440 return
1441 }
1442
1443 func libc_setlogin_trampoline()
1444
1445
1446
1447
1448
1449 func Setpgid(pid int, pgid int) (err error) {
1450 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 func libc_setpgid_trampoline()
1458
1459
1460
1461
1462
1463 func Setpriority(which int, who int, prio int) (err error) {
1464 _, _, e1 := syscall(abi.FuncPCABI0(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1465 if e1 != 0 {
1466 err = errnoErr(e1)
1467 }
1468 return
1469 }
1470
1471 func libc_setpriority_trampoline()
1472
1473
1474
1475
1476
1477 func Setprivexec(flag int) (err error) {
1478 _, _, e1 := syscall(abi.FuncPCABI0(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
1479 if e1 != 0 {
1480 err = errnoErr(e1)
1481 }
1482 return
1483 }
1484
1485 func libc_setprivexec_trampoline()
1486
1487
1488
1489
1490
1491 func Setregid(rgid int, egid int) (err error) {
1492 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
1493 if e1 != 0 {
1494 err = errnoErr(e1)
1495 }
1496 return
1497 }
1498
1499 func libc_setregid_trampoline()
1500
1501
1502
1503
1504
1505 func Setreuid(ruid int, euid int) (err error) {
1506 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
1507 if e1 != 0 {
1508 err = errnoErr(e1)
1509 }
1510 return
1511 }
1512
1513 func libc_setreuid_trampoline()
1514
1515
1516
1517
1518
1519 func setrlimit(which int, lim *Rlimit) (err error) {
1520 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1521 if e1 != 0 {
1522 err = errnoErr(e1)
1523 }
1524 return
1525 }
1526
1527 func libc_setrlimit_trampoline()
1528
1529
1530
1531
1532
1533 func Setsid() (pid int, err error) {
1534 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setsid_trampoline), 0, 0, 0)
1535 pid = int(r0)
1536 if e1 != 0 {
1537 err = errnoErr(e1)
1538 }
1539 return
1540 }
1541
1542 func libc_setsid_trampoline()
1543
1544
1545
1546
1547
1548 func Settimeofday(tp *Timeval) (err error) {
1549 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
1550 if e1 != 0 {
1551 err = errnoErr(e1)
1552 }
1553 return
1554 }
1555
1556 func libc_settimeofday_trampoline()
1557
1558
1559
1560
1561
1562 func Setuid(uid int) (err error) {
1563 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setuid_trampoline), uintptr(uid), 0, 0)
1564 if e1 != 0 {
1565 err = errnoErr(e1)
1566 }
1567 return
1568 }
1569
1570 func libc_setuid_trampoline()
1571
1572
1573
1574
1575
1576 func Symlink(path string, link string) (err error) {
1577 var _p0 *byte
1578 _p0, err = BytePtrFromString(path)
1579 if err != nil {
1580 return
1581 }
1582 var _p1 *byte
1583 _p1, err = BytePtrFromString(link)
1584 if err != nil {
1585 return
1586 }
1587 _, _, e1 := syscall(abi.FuncPCABI0(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1588 if e1 != 0 {
1589 err = errnoErr(e1)
1590 }
1591 return
1592 }
1593
1594 func libc_symlink_trampoline()
1595
1596
1597
1598
1599
1600 func Sync() (err error) {
1601 _, _, e1 := syscall(abi.FuncPCABI0(libc_sync_trampoline), 0, 0, 0)
1602 if e1 != 0 {
1603 err = errnoErr(e1)
1604 }
1605 return
1606 }
1607
1608 func libc_sync_trampoline()
1609
1610
1611
1612
1613
1614 func Truncate(path string, length int64) (err error) {
1615 var _p0 *byte
1616 _p0, err = BytePtrFromString(path)
1617 if err != nil {
1618 return
1619 }
1620 _, _, e1 := syscall(abi.FuncPCABI0(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1621 if e1 != 0 {
1622 err = errnoErr(e1)
1623 }
1624 return
1625 }
1626
1627 func libc_truncate_trampoline()
1628
1629
1630
1631
1632
1633 func Umask(newmask int) (oldmask int) {
1634 r0, _, _ := syscall(abi.FuncPCABI0(libc_umask_trampoline), uintptr(newmask), 0, 0)
1635 oldmask = int(r0)
1636 return
1637 }
1638
1639 func libc_umask_trampoline()
1640
1641
1642
1643
1644
1645 func Undelete(path string) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := syscall(abi.FuncPCABI0(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 func libc_undelete_trampoline()
1659
1660
1661
1662
1663
1664 func Unlink(path string) (err error) {
1665 var _p0 *byte
1666 _p0, err = BytePtrFromString(path)
1667 if err != nil {
1668 return
1669 }
1670 _, _, e1 := syscall(abi.FuncPCABI0(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1671 if e1 != 0 {
1672 err = errnoErr(e1)
1673 }
1674 return
1675 }
1676
1677 func libc_unlink_trampoline()
1678
1679
1680
1681
1682
1683 func Unmount(path string, flags int) (err error) {
1684 var _p0 *byte
1685 _p0, err = BytePtrFromString(path)
1686 if err != nil {
1687 return
1688 }
1689 _, _, e1 := syscall(abi.FuncPCABI0(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1690 if e1 != 0 {
1691 err = errnoErr(e1)
1692 }
1693 return
1694 }
1695
1696 func libc_unmount_trampoline()
1697
1698
1699
1700
1701
1702 func write(fd int, p []byte) (n int, err error) {
1703 var _p0 unsafe.Pointer
1704 if len(p) > 0 {
1705 _p0 = unsafe.Pointer(&p[0])
1706 } else {
1707 _p0 = unsafe.Pointer(&_zero)
1708 }
1709 r0, _, e1 := syscall(abi.FuncPCABI0(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1710 n = int(r0)
1711 if e1 != 0 {
1712 err = errnoErr(e1)
1713 }
1714 return
1715 }
1716
1717 func libc_write_trampoline()
1718
1719
1720
1721
1722
1723 func writev(fd int, iovecs []Iovec) (cnt uintptr, err error) {
1724 var _p0 unsafe.Pointer
1725 if len(iovecs) > 0 {
1726 _p0 = unsafe.Pointer(&iovecs[0])
1727 } else {
1728 _p0 = unsafe.Pointer(&_zero)
1729 }
1730 r0, _, e1 := syscallX(abi.FuncPCABI0(libc_writev_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
1731 cnt = uintptr(r0)
1732 if e1 != 0 {
1733 err = errnoErr(e1)
1734 }
1735 return
1736 }
1737
1738 func libc_writev_trampoline()
1739
1740
1741
1742
1743
1744 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1745 r0, _, e1 := syscall6X(abi.FuncPCABI0(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1746 ret = uintptr(r0)
1747 if e1 != 0 {
1748 err = errnoErr(e1)
1749 }
1750 return
1751 }
1752
1753 func libc_mmap_trampoline()
1754
1755
1756
1757
1758
1759 func munmap(addr uintptr, length uintptr) (err error) {
1760 _, _, e1 := syscall(abi.FuncPCABI0(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
1761 if e1 != 0 {
1762 err = errnoErr(e1)
1763 }
1764 return
1765 }
1766
1767 func libc_munmap_trampoline()
1768
1769
1770
1771
1772
1773 func fork() (pid int, err error) {
1774 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_fork_trampoline), 0, 0, 0)
1775 pid = int(r0)
1776 if e1 != 0 {
1777 err = errnoErr(e1)
1778 }
1779 return
1780 }
1781
1782 func libc_fork_trampoline()
1783
1784
1785
1786
1787
1788 func execve(path *byte, argv **byte, envp **byte) (err error) {
1789 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_execve_trampoline), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(argv)), uintptr(unsafe.Pointer(envp)))
1790 if e1 != 0 {
1791 err = errnoErr(e1)
1792 }
1793 return
1794 }
1795
1796 func libc_execve_trampoline()
1797
1798
1799
1800
1801
1802 func exit(res int) (err error) {
1803 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_exit_trampoline), uintptr(res), 0, 0)
1804 if e1 != 0 {
1805 err = errnoErr(e1)
1806 }
1807 return
1808 }
1809
1810 func libc_exit_trampoline()
1811
1812
1813
1814
1815
1816 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
1817 var _p0 unsafe.Pointer
1818 if len(mib) > 0 {
1819 _p0 = unsafe.Pointer(&mib[0])
1820 } else {
1821 _p0 = unsafe.Pointer(&_zero)
1822 }
1823 _, _, e1 := syscall6(abi.FuncPCABI0(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
1824 if e1 != 0 {
1825 err = errnoErr(e1)
1826 }
1827 return
1828 }
1829
1830 func libc_sysctl_trampoline()
1831
1832
1833
1834
1835
1836 func unlinkat(fd int, path string, flags int) (err error) {
1837 var _p0 *byte
1838 _p0, err = BytePtrFromString(path)
1839 if err != nil {
1840 return
1841 }
1842 _, _, e1 := syscall(abi.FuncPCABI0(libc_unlinkat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1843 if e1 != 0 {
1844 err = errnoErr(e1)
1845 }
1846 return
1847 }
1848
1849 func libc_unlinkat_trampoline()
1850
1851
1852
1853
1854
1855 func openat(fd int, path string, flags int, perm uint32) (fdret int, err error) {
1856 var _p0 *byte
1857 _p0, err = BytePtrFromString(path)
1858 if err != nil {
1859 return
1860 }
1861 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_openat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(perm), 0, 0)
1862 fdret = int(r0)
1863 if e1 != 0 {
1864 err = errnoErr(e1)
1865 }
1866 return
1867 }
1868
1869 func libc_openat_trampoline()
1870
1871
1872
1873
1874
1875 func getcwd(buf []byte) (n int, err error) {
1876 var _p0 unsafe.Pointer
1877 if len(buf) > 0 {
1878 _p0 = unsafe.Pointer(&buf[0])
1879 } else {
1880 _p0 = unsafe.Pointer(&_zero)
1881 }
1882 r0, _, e1 := syscall(abi.FuncPCABI0(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
1883 n = int(r0)
1884 if e1 != 0 {
1885 err = errnoErr(e1)
1886 }
1887 return
1888 }
1889
1890 func libc_getcwd_trampoline()
1891
1892
1893
1894
1895
1896 func Fstat(fd int, stat *Stat_t) (err error) {
1897 _, _, e1 := syscall(abi.FuncPCABI0(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1898 if e1 != 0 {
1899 err = errnoErr(e1)
1900 }
1901 return
1902 }
1903
1904 func libc_fstat_trampoline()
1905
1906
1907
1908
1909
1910 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1911 _, _, e1 := syscall(abi.FuncPCABI0(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1912 if e1 != 0 {
1913 err = errnoErr(e1)
1914 }
1915 return
1916 }
1917
1918 func libc_fstatfs_trampoline()
1919
1920
1921
1922
1923
1924 func Gettimeofday(tp *Timeval) (err error) {
1925 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
1926 if e1 != 0 {
1927 err = errnoErr(e1)
1928 }
1929 return
1930 }
1931
1932 func libc_gettimeofday_trampoline()
1933
1934
1935
1936
1937
1938 func Lstat(path string, stat *Stat_t) (err error) {
1939 var _p0 *byte
1940 _p0, err = BytePtrFromString(path)
1941 if err != nil {
1942 return
1943 }
1944 _, _, e1 := syscall(abi.FuncPCABI0(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1945 if e1 != 0 {
1946 err = errnoErr(e1)
1947 }
1948 return
1949 }
1950
1951 func libc_lstat_trampoline()
1952
1953
1954
1955
1956
1957 func Stat(path string, stat *Stat_t) (err error) {
1958 var _p0 *byte
1959 _p0, err = BytePtrFromString(path)
1960 if err != nil {
1961 return
1962 }
1963 _, _, e1 := syscall(abi.FuncPCABI0(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1964 if e1 != 0 {
1965 err = errnoErr(e1)
1966 }
1967 return
1968 }
1969
1970 func libc_stat_trampoline()
1971
1972
1973
1974
1975
1976 func Statfs(path string, stat *Statfs_t) (err error) {
1977 var _p0 *byte
1978 _p0, err = BytePtrFromString(path)
1979 if err != nil {
1980 return
1981 }
1982 _, _, e1 := syscall(abi.FuncPCABI0(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1983 if e1 != 0 {
1984 err = errnoErr(e1)
1985 }
1986 return
1987 }
1988
1989 func libc_statfs_trampoline()
1990
1991
1992
1993
1994
1995 func fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1996 var _p0 *byte
1997 _p0, err = BytePtrFromString(path)
1998 if err != nil {
1999 return
2000 }
2001 _, _, e1 := syscall6(abi.FuncPCABI0(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2002 if e1 != 0 {
2003 err = errnoErr(e1)
2004 }
2005 return
2006 }
2007
2008 func libc_fstatat_trampoline()
2009
2010
2011
2012
2013
2014
2015 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
2016 if runtime.GOOS == "ios" {
2017 panic("unimplemented")
2018 }
2019 _, _, e1 := syscall6(abi.FuncPCABI0(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
2020 if e1 != 0 {
2021 err = errnoErr(e1)
2022 }
2023 return
2024 }
2025
2026 func libc_ptrace_trampoline()
2027
2028
2029
View as plain text