Source file
src/syscall/zsyscall_openbsd_arm64.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 pipe2(p *[2]_C_int, flags int) (err error) {
334 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_pipe2_trampoline), uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
335 if e1 != 0 {
336 err = errnoErr(e1)
337 }
338 return
339 }
340
341 func libc_pipe2_trampoline()
342
343
344
345
346
347 func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
348 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_accept4_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
349 nfd = int(r0)
350 if e1 != 0 {
351 err = errnoErr(e1)
352 }
353 return
354 }
355
356 func libc_accept4_trampoline()
357
358
359
360
361
362 func getdents(fd int, buf []byte) (n int, err error) {
363 var _p0 unsafe.Pointer
364 if len(buf) > 0 {
365 _p0 = unsafe.Pointer(&buf[0])
366 } else {
367 _p0 = unsafe.Pointer(&_zero)
368 }
369 r0, _, e1 := syscall(abi.FuncPCABI0(libc_getdents_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)))
370 n = int(r0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 func libc_getdents_trampoline()
378
379
380
381
382
383 func Access(path string, mode uint32) (err error) {
384 var _p0 *byte
385 _p0, err = BytePtrFromString(path)
386 if err != nil {
387 return
388 }
389 _, _, e1 := syscall(abi.FuncPCABI0(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
390 if e1 != 0 {
391 err = errnoErr(e1)
392 }
393 return
394 }
395
396 func libc_access_trampoline()
397
398
399
400
401
402 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
403 _, _, e1 := syscall(abi.FuncPCABI0(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
404 if e1 != 0 {
405 err = errnoErr(e1)
406 }
407 return
408 }
409
410 func libc_adjtime_trampoline()
411
412
413
414
415
416 func Chdir(path string) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := syscall(abi.FuncPCABI0(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_chdir_trampoline()
430
431
432
433
434
435 func Chflags(path string, flags int) (err error) {
436 var _p0 *byte
437 _p0, err = BytePtrFromString(path)
438 if err != nil {
439 return
440 }
441 _, _, e1 := syscall(abi.FuncPCABI0(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
447
448 func libc_chflags_trampoline()
449
450
451
452
453
454 func Chmod(path string, mode uint32) (err error) {
455 var _p0 *byte
456 _p0, err = BytePtrFromString(path)
457 if err != nil {
458 return
459 }
460 _, _, e1 := syscall(abi.FuncPCABI0(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
461 if e1 != 0 {
462 err = errnoErr(e1)
463 }
464 return
465 }
466
467 func libc_chmod_trampoline()
468
469
470
471
472
473 func Chown(path string, uid int, gid int) (err error) {
474 var _p0 *byte
475 _p0, err = BytePtrFromString(path)
476 if err != nil {
477 return
478 }
479 _, _, e1 := syscall(abi.FuncPCABI0(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
480 if e1 != 0 {
481 err = errnoErr(e1)
482 }
483 return
484 }
485
486 func libc_chown_trampoline()
487
488
489
490
491
492 func Chroot(path string) (err error) {
493 var _p0 *byte
494 _p0, err = BytePtrFromString(path)
495 if err != nil {
496 return
497 }
498 _, _, e1 := syscall(abi.FuncPCABI0(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 func libc_chroot_trampoline()
506
507
508
509
510
511 func Close(fd int) (err error) {
512 _, _, e1 := syscall(abi.FuncPCABI0(libc_close_trampoline), uintptr(fd), 0, 0)
513 if e1 != 0 {
514 err = errnoErr(e1)
515 }
516 return
517 }
518
519 func libc_close_trampoline()
520
521
522
523
524
525 func Dup(fd int) (nfd int, err error) {
526 r0, _, e1 := syscall(abi.FuncPCABI0(libc_dup_trampoline), uintptr(fd), 0, 0)
527 nfd = int(r0)
528 if e1 != 0 {
529 err = errnoErr(e1)
530 }
531 return
532 }
533
534 func libc_dup_trampoline()
535
536
537
538
539
540 func Dup2(from int, to int) (err error) {
541 _, _, e1 := syscall(abi.FuncPCABI0(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
542 if e1 != 0 {
543 err = errnoErr(e1)
544 }
545 return
546 }
547
548 func libc_dup2_trampoline()
549
550
551
552
553
554 func Fchdir(fd int) (err error) {
555 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchdir_trampoline), uintptr(fd), 0, 0)
556 if e1 != 0 {
557 err = errnoErr(e1)
558 }
559 return
560 }
561
562 func libc_fchdir_trampoline()
563
564
565
566
567
568 func Fchflags(fd int, flags int) (err error) {
569 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
570 if e1 != 0 {
571 err = errnoErr(e1)
572 }
573 return
574 }
575
576 func libc_fchflags_trampoline()
577
578
579
580
581
582 func Fchmod(fd int, mode uint32) (err error) {
583 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
584 if e1 != 0 {
585 err = errnoErr(e1)
586 }
587 return
588 }
589
590 func libc_fchmod_trampoline()
591
592
593
594
595
596 func Fchown(fd int, uid int, gid int) (err error) {
597 _, _, e1 := syscall(abi.FuncPCABI0(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
598 if e1 != 0 {
599 err = errnoErr(e1)
600 }
601 return
602 }
603
604 func libc_fchown_trampoline()
605
606
607
608
609
610 func Flock(fd int, how int) (err error) {
611 _, _, e1 := syscall(abi.FuncPCABI0(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
612 if e1 != 0 {
613 err = errnoErr(e1)
614 }
615 return
616 }
617
618 func libc_flock_trampoline()
619
620
621
622
623
624 func Fpathconf(fd int, name int) (val int, err error) {
625 r0, _, e1 := syscall(abi.FuncPCABI0(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
626 val = int(r0)
627 if e1 != 0 {
628 err = errnoErr(e1)
629 }
630 return
631 }
632
633 func libc_fpathconf_trampoline()
634
635
636
637
638
639 func Fstat(fd int, stat *Stat_t) (err error) {
640 _, _, e1 := syscall(abi.FuncPCABI0(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
641 if e1 != 0 {
642 err = errnoErr(e1)
643 }
644 return
645 }
646
647 func libc_fstat_trampoline()
648
649
650
651
652
653 func Fstatfs(fd int, stat *Statfs_t) (err error) {
654 _, _, e1 := syscall(abi.FuncPCABI0(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fstatfs_trampoline()
662
663
664
665
666
667 func Fsync(fd int) (err error) {
668 _, _, e1 := syscall(abi.FuncPCABI0(libc_fsync_trampoline), uintptr(fd), 0, 0)
669 if e1 != 0 {
670 err = errnoErr(e1)
671 }
672 return
673 }
674
675 func libc_fsync_trampoline()
676
677
678
679
680
681 func Ftruncate(fd int, length int64) (err error) {
682 _, _, e1 := syscall(abi.FuncPCABI0(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
683 if e1 != 0 {
684 err = errnoErr(e1)
685 }
686 return
687 }
688
689 func libc_ftruncate_trampoline()
690
691
692
693
694
695 func Getegid() (egid int) {
696 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getegid_trampoline), 0, 0, 0)
697 egid = int(r0)
698 return
699 }
700
701 func libc_getegid_trampoline()
702
703
704
705
706
707 func Geteuid() (uid int) {
708 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_geteuid_trampoline), 0, 0, 0)
709 uid = int(r0)
710 return
711 }
712
713 func libc_geteuid_trampoline()
714
715
716
717
718
719 func Getgid() (gid int) {
720 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getgid_trampoline), 0, 0, 0)
721 gid = int(r0)
722 return
723 }
724
725 func libc_getgid_trampoline()
726
727
728
729
730
731 func Getpgid(pid int) (pgid int, err error) {
732 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getpgid_trampoline), uintptr(pid), 0, 0)
733 pgid = int(r0)
734 if e1 != 0 {
735 err = errnoErr(e1)
736 }
737 return
738 }
739
740 func libc_getpgid_trampoline()
741
742
743
744
745
746 func Getpgrp() (pgrp int) {
747 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getpgrp_trampoline), 0, 0, 0)
748 pgrp = int(r0)
749 return
750 }
751
752 func libc_getpgrp_trampoline()
753
754
755
756
757
758 func Getpid() (pid int) {
759 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getpid_trampoline), 0, 0, 0)
760 pid = int(r0)
761 return
762 }
763
764 func libc_getpid_trampoline()
765
766
767
768
769
770 func Getppid() (ppid int) {
771 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getppid_trampoline), 0, 0, 0)
772 ppid = int(r0)
773 return
774 }
775
776 func libc_getppid_trampoline()
777
778
779
780
781
782 func Getpriority(which int, who int) (prio int, err error) {
783 r0, _, e1 := syscall(abi.FuncPCABI0(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
784 prio = int(r0)
785 if e1 != 0 {
786 err = errnoErr(e1)
787 }
788 return
789 }
790
791 func libc_getpriority_trampoline()
792
793
794
795
796
797 func Getrlimit(which int, lim *Rlimit) (err error) {
798 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
799 if e1 != 0 {
800 err = errnoErr(e1)
801 }
802 return
803 }
804
805 func libc_getrlimit_trampoline()
806
807
808
809
810
811 func Getrusage(who int, rusage *Rusage) (err error) {
812 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
813 if e1 != 0 {
814 err = errnoErr(e1)
815 }
816 return
817 }
818
819 func libc_getrusage_trampoline()
820
821
822
823
824
825 func Getsid(pid int) (sid int, err error) {
826 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getsid_trampoline), uintptr(pid), 0, 0)
827 sid = int(r0)
828 if e1 != 0 {
829 err = errnoErr(e1)
830 }
831 return
832 }
833
834 func libc_getsid_trampoline()
835
836
837
838
839
840 func Gettimeofday(tv *Timeval) (err error) {
841 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tv)), 0, 0)
842 if e1 != 0 {
843 err = errnoErr(e1)
844 }
845 return
846 }
847
848 func libc_gettimeofday_trampoline()
849
850
851
852
853
854 func Getuid() (uid int) {
855 r0, _, _ := rawSyscall(abi.FuncPCABI0(libc_getuid_trampoline), 0, 0, 0)
856 uid = int(r0)
857 return
858 }
859
860 func libc_getuid_trampoline()
861
862
863
864
865
866 func Issetugid() (tainted bool) {
867 r0, _, _ := syscall(abi.FuncPCABI0(libc_issetugid_trampoline), 0, 0, 0)
868 tainted = bool(r0 != 0)
869 return
870 }
871
872 func libc_issetugid_trampoline()
873
874
875
876
877
878 func Kill(pid int, signum Signal) (err error) {
879 _, _, e1 := syscall(abi.FuncPCABI0(libc_kill_trampoline), uintptr(pid), uintptr(signum), 0)
880 if e1 != 0 {
881 err = errnoErr(e1)
882 }
883 return
884 }
885
886 func libc_kill_trampoline()
887
888
889
890
891
892 func Kqueue() (fd int, err error) {
893 r0, _, e1 := syscall(abi.FuncPCABI0(libc_kqueue_trampoline), 0, 0, 0)
894 fd = int(r0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 func libc_kqueue_trampoline()
902
903
904
905
906
907 func Lchown(path string, uid int, gid int) (err error) {
908 var _p0 *byte
909 _p0, err = BytePtrFromString(path)
910 if err != nil {
911 return
912 }
913 _, _, e1 := syscall(abi.FuncPCABI0(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
919
920 func libc_lchown_trampoline()
921
922
923
924
925
926 func Link(path string, link string) (err error) {
927 var _p0 *byte
928 _p0, err = BytePtrFromString(path)
929 if err != nil {
930 return
931 }
932 var _p1 *byte
933 _p1, err = BytePtrFromString(link)
934 if err != nil {
935 return
936 }
937 _, _, e1 := syscall(abi.FuncPCABI0(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
938 if e1 != 0 {
939 err = errnoErr(e1)
940 }
941 return
942 }
943
944 func libc_link_trampoline()
945
946
947
948
949
950 func Listen(s int, backlog int) (err error) {
951 _, _, e1 := syscall(abi.FuncPCABI0(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
952 if e1 != 0 {
953 err = errnoErr(e1)
954 }
955 return
956 }
957
958 func libc_listen_trampoline()
959
960
961
962
963
964 func Lstat(path string, stat *Stat_t) (err error) {
965 var _p0 *byte
966 _p0, err = BytePtrFromString(path)
967 if err != nil {
968 return
969 }
970 _, _, e1 := syscall(abi.FuncPCABI0(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
971 if e1 != 0 {
972 err = errnoErr(e1)
973 }
974 return
975 }
976
977 func libc_lstat_trampoline()
978
979
980
981
982
983 func Mkdir(path string, mode uint32) (err error) {
984 var _p0 *byte
985 _p0, err = BytePtrFromString(path)
986 if err != nil {
987 return
988 }
989 _, _, e1 := syscall(abi.FuncPCABI0(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
990 if e1 != 0 {
991 err = errnoErr(e1)
992 }
993 return
994 }
995
996 func libc_mkdir_trampoline()
997
998
999
1000
1001
1002 func Mkfifo(path string, mode uint32) (err error) {
1003 var _p0 *byte
1004 _p0, err = BytePtrFromString(path)
1005 if err != nil {
1006 return
1007 }
1008 _, _, e1 := syscall(abi.FuncPCABI0(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1009 if e1 != 0 {
1010 err = errnoErr(e1)
1011 }
1012 return
1013 }
1014
1015 func libc_mkfifo_trampoline()
1016
1017
1018
1019
1020
1021 func Mknod(path string, mode uint32, dev int) (err error) {
1022 var _p0 *byte
1023 _p0, err = BytePtrFromString(path)
1024 if err != nil {
1025 return
1026 }
1027 _, _, e1 := syscall(abi.FuncPCABI0(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1028 if e1 != 0 {
1029 err = errnoErr(e1)
1030 }
1031 return
1032 }
1033
1034 func libc_mknod_trampoline()
1035
1036
1037
1038
1039
1040 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1041 _, _, e1 := syscall(abi.FuncPCABI0(libc_nanosleep_trampoline), uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1042 if e1 != 0 {
1043 err = errnoErr(e1)
1044 }
1045 return
1046 }
1047
1048 func libc_nanosleep_trampoline()
1049
1050
1051
1052
1053
1054 func Open(path string, mode int, perm uint32) (fd int, err error) {
1055 var _p0 *byte
1056 _p0, err = BytePtrFromString(path)
1057 if err != nil {
1058 return
1059 }
1060 r0, _, e1 := syscall(abi.FuncPCABI0(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1061 fd = int(r0)
1062 if e1 != 0 {
1063 err = errnoErr(e1)
1064 }
1065 return
1066 }
1067
1068 func libc_open_trampoline()
1069
1070
1071
1072
1073
1074 func Pathconf(path string, name int) (val int, err error) {
1075 var _p0 *byte
1076 _p0, err = BytePtrFromString(path)
1077 if err != nil {
1078 return
1079 }
1080 r0, _, e1 := syscall(abi.FuncPCABI0(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1081 val = int(r0)
1082 if e1 != 0 {
1083 err = errnoErr(e1)
1084 }
1085 return
1086 }
1087
1088 func libc_pathconf_trampoline()
1089
1090
1091
1092
1093
1094 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1095 var _p0 unsafe.Pointer
1096 if len(p) > 0 {
1097 _p0 = unsafe.Pointer(&p[0])
1098 } else {
1099 _p0 = unsafe.Pointer(&_zero)
1100 }
1101 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1102 n = int(r0)
1103 if e1 != 0 {
1104 err = errnoErr(e1)
1105 }
1106 return
1107 }
1108
1109 func libc_pread_trampoline()
1110
1111
1112
1113
1114
1115 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1116 var _p0 unsafe.Pointer
1117 if len(p) > 0 {
1118 _p0 = unsafe.Pointer(&p[0])
1119 } else {
1120 _p0 = unsafe.Pointer(&_zero)
1121 }
1122 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1123 n = int(r0)
1124 if e1 != 0 {
1125 err = errnoErr(e1)
1126 }
1127 return
1128 }
1129
1130 func libc_pwrite_trampoline()
1131
1132
1133
1134
1135
1136 func read(fd int, p []byte) (n int, err error) {
1137 var _p0 unsafe.Pointer
1138 if len(p) > 0 {
1139 _p0 = unsafe.Pointer(&p[0])
1140 } else {
1141 _p0 = unsafe.Pointer(&_zero)
1142 }
1143 r0, _, e1 := syscall(abi.FuncPCABI0(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1144 n = int(r0)
1145 if e1 != 0 {
1146 err = errnoErr(e1)
1147 }
1148 return
1149 }
1150
1151 func libc_read_trampoline()
1152
1153
1154
1155
1156
1157 func Readlink(path string, buf []byte) (n int, err error) {
1158 var _p0 *byte
1159 _p0, err = BytePtrFromString(path)
1160 if err != nil {
1161 return
1162 }
1163 var _p1 unsafe.Pointer
1164 if len(buf) > 0 {
1165 _p1 = unsafe.Pointer(&buf[0])
1166 } else {
1167 _p1 = unsafe.Pointer(&_zero)
1168 }
1169 r0, _, e1 := syscall(abi.FuncPCABI0(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1170 n = int(r0)
1171 if e1 != 0 {
1172 err = errnoErr(e1)
1173 }
1174 return
1175 }
1176
1177 func libc_readlink_trampoline()
1178
1179
1180
1181
1182
1183 func Rename(from string, to string) (err error) {
1184 var _p0 *byte
1185 _p0, err = BytePtrFromString(from)
1186 if err != nil {
1187 return
1188 }
1189 var _p1 *byte
1190 _p1, err = BytePtrFromString(to)
1191 if err != nil {
1192 return
1193 }
1194 _, _, e1 := syscall(abi.FuncPCABI0(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1195 if e1 != 0 {
1196 err = errnoErr(e1)
1197 }
1198 return
1199 }
1200
1201 func libc_rename_trampoline()
1202
1203
1204
1205
1206
1207 func Revoke(path string) (err error) {
1208 var _p0 *byte
1209 _p0, err = BytePtrFromString(path)
1210 if err != nil {
1211 return
1212 }
1213 _, _, e1 := syscall(abi.FuncPCABI0(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1214 if e1 != 0 {
1215 err = errnoErr(e1)
1216 }
1217 return
1218 }
1219
1220 func libc_revoke_trampoline()
1221
1222
1223
1224
1225
1226 func Rmdir(path string) (err error) {
1227 var _p0 *byte
1228 _p0, err = BytePtrFromString(path)
1229 if err != nil {
1230 return
1231 }
1232 _, _, e1 := syscall(abi.FuncPCABI0(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1233 if e1 != 0 {
1234 err = errnoErr(e1)
1235 }
1236 return
1237 }
1238
1239 func libc_rmdir_trampoline()
1240
1241
1242
1243
1244
1245 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1246 _, _, 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)
1247 if e1 != 0 {
1248 err = errnoErr(e1)
1249 }
1250 return
1251 }
1252
1253 func libc_select_trampoline()
1254
1255
1256
1257
1258
1259 func Setegid(egid int) (err error) {
1260 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setegid_trampoline), uintptr(egid), 0, 0)
1261 if e1 != 0 {
1262 err = errnoErr(e1)
1263 }
1264 return
1265 }
1266
1267 func libc_setegid_trampoline()
1268
1269
1270
1271
1272
1273 func Seteuid(euid int) (err error) {
1274 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1275 if e1 != 0 {
1276 err = errnoErr(e1)
1277 }
1278 return
1279 }
1280
1281 func libc_seteuid_trampoline()
1282
1283
1284
1285
1286
1287 func Setgid(gid int) (err error) {
1288 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setgid_trampoline), uintptr(gid), 0, 0)
1289 if e1 != 0 {
1290 err = errnoErr(e1)
1291 }
1292 return
1293 }
1294
1295 func libc_setgid_trampoline()
1296
1297
1298
1299
1300
1301 func Setlogin(name string) (err error) {
1302 var _p0 *byte
1303 _p0, err = BytePtrFromString(name)
1304 if err != nil {
1305 return
1306 }
1307 _, _, e1 := syscall(abi.FuncPCABI0(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1313
1314 func libc_setlogin_trampoline()
1315
1316
1317
1318
1319
1320 func Setpgid(pid int, pgid int) (err error) {
1321 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1322 if e1 != 0 {
1323 err = errnoErr(e1)
1324 }
1325 return
1326 }
1327
1328 func libc_setpgid_trampoline()
1329
1330
1331
1332
1333
1334 func Setpriority(which int, who int, prio int) (err error) {
1335 _, _, e1 := syscall(abi.FuncPCABI0(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1336 if e1 != 0 {
1337 err = errnoErr(e1)
1338 }
1339 return
1340 }
1341
1342 func libc_setpriority_trampoline()
1343
1344
1345
1346
1347
1348 func Setregid(rgid int, egid int) (err error) {
1349 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
1350 if e1 != 0 {
1351 err = errnoErr(e1)
1352 }
1353 return
1354 }
1355
1356 func libc_setregid_trampoline()
1357
1358
1359
1360
1361
1362 func Setreuid(ruid int, euid int) (err error) {
1363 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
1364 if e1 != 0 {
1365 err = errnoErr(e1)
1366 }
1367 return
1368 }
1369
1370 func libc_setreuid_trampoline()
1371
1372
1373
1374
1375
1376 func Setrlimit(which int, lim *Rlimit) (err error) {
1377 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1378 if e1 != 0 {
1379 err = errnoErr(e1)
1380 }
1381 return
1382 }
1383
1384 func libc_setrlimit_trampoline()
1385
1386
1387
1388
1389
1390 func Setsid() (pid int, err error) {
1391 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setsid_trampoline), 0, 0, 0)
1392 pid = int(r0)
1393 if e1 != 0 {
1394 err = errnoErr(e1)
1395 }
1396 return
1397 }
1398
1399 func libc_setsid_trampoline()
1400
1401
1402
1403
1404
1405 func Settimeofday(tp *Timeval) (err error) {
1406 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
1407 if e1 != 0 {
1408 err = errnoErr(e1)
1409 }
1410 return
1411 }
1412
1413 func libc_settimeofday_trampoline()
1414
1415
1416
1417
1418
1419 func Setuid(uid int) (err error) {
1420 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_setuid_trampoline), uintptr(uid), 0, 0)
1421 if e1 != 0 {
1422 err = errnoErr(e1)
1423 }
1424 return
1425 }
1426
1427 func libc_setuid_trampoline()
1428
1429
1430
1431
1432
1433 func Stat(path string, stat *Stat_t) (err error) {
1434 var _p0 *byte
1435 _p0, err = BytePtrFromString(path)
1436 if err != nil {
1437 return
1438 }
1439 _, _, e1 := syscall(abi.FuncPCABI0(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1440 if e1 != 0 {
1441 err = errnoErr(e1)
1442 }
1443 return
1444 }
1445
1446 func libc_stat_trampoline()
1447
1448
1449
1450
1451
1452 func Statfs(path string, stat *Statfs_t) (err error) {
1453 var _p0 *byte
1454 _p0, err = BytePtrFromString(path)
1455 if err != nil {
1456 return
1457 }
1458 _, _, e1 := syscall(abi.FuncPCABI0(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1459 if e1 != 0 {
1460 err = errnoErr(e1)
1461 }
1462 return
1463 }
1464
1465 func libc_statfs_trampoline()
1466
1467
1468
1469
1470
1471 func Symlink(path string, link string) (err error) {
1472 var _p0 *byte
1473 _p0, err = BytePtrFromString(path)
1474 if err != nil {
1475 return
1476 }
1477 var _p1 *byte
1478 _p1, err = BytePtrFromString(link)
1479 if err != nil {
1480 return
1481 }
1482 _, _, e1 := syscall(abi.FuncPCABI0(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1483 if e1 != 0 {
1484 err = errnoErr(e1)
1485 }
1486 return
1487 }
1488
1489 func libc_symlink_trampoline()
1490
1491
1492
1493
1494
1495 func Sync() (err error) {
1496 _, _, e1 := syscall(abi.FuncPCABI0(libc_sync_trampoline), 0, 0, 0)
1497 if e1 != 0 {
1498 err = errnoErr(e1)
1499 }
1500 return
1501 }
1502
1503 func libc_sync_trampoline()
1504
1505
1506
1507
1508
1509 func Truncate(path string, length int64) (err error) {
1510 var _p0 *byte
1511 _p0, err = BytePtrFromString(path)
1512 if err != nil {
1513 return
1514 }
1515 _, _, e1 := syscall(abi.FuncPCABI0(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1516 if e1 != 0 {
1517 err = errnoErr(e1)
1518 }
1519 return
1520 }
1521
1522 func libc_truncate_trampoline()
1523
1524
1525
1526
1527
1528 func Umask(newmask int) (oldmask int) {
1529 r0, _, _ := syscall(abi.FuncPCABI0(libc_umask_trampoline), uintptr(newmask), 0, 0)
1530 oldmask = int(r0)
1531 return
1532 }
1533
1534 func libc_umask_trampoline()
1535
1536
1537
1538
1539
1540 func Unlink(path string) (err error) {
1541 var _p0 *byte
1542 _p0, err = BytePtrFromString(path)
1543 if err != nil {
1544 return
1545 }
1546 _, _, e1 := syscall(abi.FuncPCABI0(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1547 if e1 != 0 {
1548 err = errnoErr(e1)
1549 }
1550 return
1551 }
1552
1553 func libc_unlink_trampoline()
1554
1555
1556
1557
1558
1559 func Unmount(path string, flags int) (err error) {
1560 var _p0 *byte
1561 _p0, err = BytePtrFromString(path)
1562 if err != nil {
1563 return
1564 }
1565 _, _, e1 := syscall(abi.FuncPCABI0(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1566 if e1 != 0 {
1567 err = errnoErr(e1)
1568 }
1569 return
1570 }
1571
1572 func libc_unmount_trampoline()
1573
1574
1575
1576
1577
1578 func write(fd int, p []byte) (n int, err error) {
1579 var _p0 unsafe.Pointer
1580 if len(p) > 0 {
1581 _p0 = unsafe.Pointer(&p[0])
1582 } else {
1583 _p0 = unsafe.Pointer(&_zero)
1584 }
1585 r0, _, e1 := syscall(abi.FuncPCABI0(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1586 n = int(r0)
1587 if e1 != 0 {
1588 err = errnoErr(e1)
1589 }
1590 return
1591 }
1592
1593 func libc_write_trampoline()
1594
1595
1596
1597
1598
1599 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1600 r0, _, e1 := syscall6X(abi.FuncPCABI0(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1601 ret = uintptr(r0)
1602 if e1 != 0 {
1603 err = errnoErr(e1)
1604 }
1605 return
1606 }
1607
1608 func libc_mmap_trampoline()
1609
1610
1611
1612
1613
1614 func munmap(addr uintptr, length uintptr) (err error) {
1615 _, _, e1 := syscall(abi.FuncPCABI0(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
1616 if e1 != 0 {
1617 err = errnoErr(e1)
1618 }
1619 return
1620 }
1621
1622 func libc_munmap_trampoline()
1623
1624
1625
1626
1627
1628 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
1629 var _p0 *byte
1630 _p0, err = BytePtrFromString(path)
1631 if err != nil {
1632 return
1633 }
1634 _, _, e1 := syscall6(abi.FuncPCABI0(libc_utimensat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
1635 if e1 != 0 {
1636 err = errnoErr(e1)
1637 }
1638 return
1639 }
1640
1641 func libc_utimensat_trampoline()
1642
1643
1644
1645
1646
1647 func directSyscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (ret uintptr, err error) {
1648 r0, _, e1 := syscall6X(abi.FuncPCABI0(libc_syscall_trampoline), uintptr(trap), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5))
1649 ret = uintptr(r0)
1650 if e1 != 0 {
1651 err = errnoErr(e1)
1652 }
1653 return
1654 }
1655
1656 func libc_syscall_trampoline()
1657
1658
1659
1660
1661
1662 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1663 r0, _, e1 := syscall(abi.FuncPCABI0(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1664 n = int(r0)
1665 if e1 != 0 {
1666 err = errnoErr(e1)
1667 }
1668 return
1669 }
1670
1671
1672
1673 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1674 r0, _, e1 := syscall(abi.FuncPCABI0(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1675 n = int(r0)
1676 if e1 != 0 {
1677 err = errnoErr(e1)
1678 }
1679 return
1680 }
1681
1682
1683
1684 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1685 r0, _, e1 := syscallX(abi.FuncPCABI0(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
1686 newoffset = int64(r0)
1687 if e1 != 0 {
1688 err = errnoErr(e1)
1689 }
1690 return
1691 }
1692
1693 func libc_lseek_trampoline()
1694
1695
1696
1697
1698
1699 func getcwd(buf []byte) (n int, err error) {
1700 var _p0 unsafe.Pointer
1701 if len(buf) > 0 {
1702 _p0 = unsafe.Pointer(&buf[0])
1703 } else {
1704 _p0 = unsafe.Pointer(&_zero)
1705 }
1706 r0, _, e1 := syscall(abi.FuncPCABI0(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
1707 n = int(r0)
1708 if e1 != 0 {
1709 err = errnoErr(e1)
1710 }
1711 return
1712 }
1713
1714 func libc_getcwd_trampoline()
1715
1716
1717
1718
1719
1720 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
1721 var _p0 unsafe.Pointer
1722 if len(mib) > 0 {
1723 _p0 = unsafe.Pointer(&mib[0])
1724 } else {
1725 _p0 = unsafe.Pointer(&_zero)
1726 }
1727 _, _, 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))
1728 if e1 != 0 {
1729 err = errnoErr(e1)
1730 }
1731 return
1732 }
1733
1734 func libc_sysctl_trampoline()
1735
1736
1737
1738
1739
1740 func fork() (pid int, err error) {
1741 r0, _, e1 := rawSyscall(abi.FuncPCABI0(libc_fork_trampoline), 0, 0, 0)
1742 pid = int(r0)
1743 if e1 != 0 {
1744 err = errnoErr(e1)
1745 }
1746 return
1747 }
1748
1749 func libc_fork_trampoline()
1750
1751
1752
1753
1754
1755 func ioctl(fd int, req int, arg int) (err error) {
1756 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
1757 if e1 != 0 {
1758 err = errnoErr(e1)
1759 }
1760 return
1761 }
1762
1763 func libc_ioctl_trampoline()
1764
1765
1766
1767
1768
1769 func execve(path *byte, argv **byte, envp **byte) (err error) {
1770 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_execve_trampoline), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(argv)), uintptr(unsafe.Pointer(envp)))
1771 if e1 != 0 {
1772 err = errnoErr(e1)
1773 }
1774 return
1775 }
1776
1777 func libc_execve_trampoline()
1778
1779
1780
1781
1782
1783 func exit(res int) (err error) {
1784 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_exit_trampoline), uintptr(res), 0, 0)
1785 if e1 != 0 {
1786 err = errnoErr(e1)
1787 }
1788 return
1789 }
1790
1791 func libc_exit_trampoline()
1792
1793
1794
1795
1796
1797
1798 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
1799 _, _, e1 := syscall6(abi.FuncPCABI0(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
1800 if e1 != 0 {
1801 err = errnoErr(e1)
1802 }
1803 return
1804 }
1805
1806 func libc_ptrace_trampoline()
1807
1808
1809
1810
1811
1812 func getentropy(p []byte) (err error) {
1813 var _p0 unsafe.Pointer
1814 if len(p) > 0 {
1815 _p0 = unsafe.Pointer(&p[0])
1816 } else {
1817 _p0 = unsafe.Pointer(&_zero)
1818 }
1819 _, _, e1 := rawSyscall(abi.FuncPCABI0(libc_getentropy_trampoline), uintptr(_p0), uintptr(len(p)), 0)
1820 if e1 != 0 {
1821 err = errnoErr(e1)
1822 }
1823 return
1824 }
1825
1826 func libc_getentropy_trampoline()
1827
1828
1829
1830
1831
1832 func fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1833 var _p0 *byte
1834 _p0, err = BytePtrFromString(path)
1835 if err != nil {
1836 return
1837 }
1838 _, _, e1 := syscall6(abi.FuncPCABI0(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1839 if e1 != 0 {
1840 err = errnoErr(e1)
1841 }
1842 return
1843 }
1844
1845 func libc_fstatat_trampoline()
1846
1847
1848
1849
1850
1851 func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (val int, err error) {
1852 r0, _, e1 := syscall(abi.FuncPCABI0(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
1853 val = int(r0)
1854 if e1 != 0 {
1855 err = errnoErr(e1)
1856 }
1857 return
1858 }
1859
1860
1861
1862 func unlinkat(fd int, path string, flags int) (err error) {
1863 var _p0 *byte
1864 _p0, err = BytePtrFromString(path)
1865 if err != nil {
1866 return
1867 }
1868 _, _, e1 := syscall(abi.FuncPCABI0(libc_unlinkat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1869 if e1 != 0 {
1870 err = errnoErr(e1)
1871 }
1872 return
1873 }
1874
1875 func libc_unlinkat_trampoline()
1876
1877
1878
1879
1880
1881 func openat(fd int, path string, flags int, perm uint32) (fdret int, err error) {
1882 var _p0 *byte
1883 _p0, err = BytePtrFromString(path)
1884 if err != nil {
1885 return
1886 }
1887 r0, _, e1 := syscall6(abi.FuncPCABI0(libc_openat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(perm), 0, 0)
1888 fdret = int(r0)
1889 if e1 != 0 {
1890 err = errnoErr(e1)
1891 }
1892 return
1893 }
1894
1895 func libc_openat_trampoline()
1896
1897
1898
View as plain text