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