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