1// mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
4// +build solaris,amd64
5
6package unix
7
8import (
9 "syscall"
10 "unsafe"
11)
12
13//go:cgo_import_dynamic libc_pipe pipe "libc.so"
14//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
15//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
16//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
17//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
18//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
19//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
20//go:cgo_import_dynamic libc_utimes utimes "libc.so"
21//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
22//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
23//go:cgo_import_dynamic libc_futimesat futimesat "libc.so"
24//go:cgo_import_dynamic libc_accept accept "libsocket.so"
25//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
26//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
27//go:cgo_import_dynamic libc_acct acct "libc.so"
28//go:cgo_import_dynamic libc___makedev __makedev "libc.so"
29//go:cgo_import_dynamic libc___major __major "libc.so"
30//go:cgo_import_dynamic libc___minor __minor "libc.so"
31//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
32//go:cgo_import_dynamic libc_poll poll "libc.so"
33//go:cgo_import_dynamic libc_access access "libc.so"
34//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
35//go:cgo_import_dynamic libc_chdir chdir "libc.so"
36//go:cgo_import_dynamic libc_chmod chmod "libc.so"
37//go:cgo_import_dynamic libc_chown chown "libc.so"
38//go:cgo_import_dynamic libc_chroot chroot "libc.so"
39//go:cgo_import_dynamic libc_close close "libc.so"
40//go:cgo_import_dynamic libc_creat creat "libc.so"
41//go:cgo_import_dynamic libc_dup dup "libc.so"
42//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
43//go:cgo_import_dynamic libc_exit exit "libc.so"
44//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
45//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
46//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
47//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
48//go:cgo_import_dynamic libc_fchown fchown "libc.so"
49//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
50//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
51//go:cgo_import_dynamic libc_flock flock "libc.so"
52//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
53//go:cgo_import_dynamic libc_fstat fstat "libc.so"
54//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
55//go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
56//go:cgo_import_dynamic libc_getdents getdents "libc.so"
57//go:cgo_import_dynamic libc_getgid getgid "libc.so"
58//go:cgo_import_dynamic libc_getpid getpid "libc.so"
59//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
60//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
61//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
62//go:cgo_import_dynamic libc_getegid getegid "libc.so"
63//go:cgo_import_dynamic libc_getppid getppid "libc.so"
64//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
65//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
66//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
67//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
68//go:cgo_import_dynamic libc_getuid getuid "libc.so"
69//go:cgo_import_dynamic libc_kill kill "libc.so"
70//go:cgo_import_dynamic libc_lchown lchown "libc.so"
71//go:cgo_import_dynamic libc_link link "libc.so"
72//go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
73//go:cgo_import_dynamic libc_lstat lstat "libc.so"
74//go:cgo_import_dynamic libc_madvise madvise "libc.so"
75//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
76//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
77//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
78//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
79//go:cgo_import_dynamic libc_mknod mknod "libc.so"
80//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
81//go:cgo_import_dynamic libc_mlock mlock "libc.so"
82//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
83//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
84//go:cgo_import_dynamic libc_msync msync "libc.so"
85//go:cgo_import_dynamic libc_munlock munlock "libc.so"
86//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
87//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
88//go:cgo_import_dynamic libc_open open "libc.so"
89//go:cgo_import_dynamic libc_openat openat "libc.so"
90//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
91//go:cgo_import_dynamic libc_pause pause "libc.so"
92//go:cgo_import_dynamic libc_pread pread "libc.so"
93//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
94//go:cgo_import_dynamic libc_read read "libc.so"
95//go:cgo_import_dynamic libc_readlink readlink "libc.so"
96//go:cgo_import_dynamic libc_rename rename "libc.so"
97//go:cgo_import_dynamic libc_renameat renameat "libc.so"
98//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
99//go:cgo_import_dynamic libc_lseek lseek "libc.so"
100//go:cgo_import_dynamic libc_select select "libc.so"
101//go:cgo_import_dynamic libc_setegid setegid "libc.so"
102//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
103//go:cgo_import_dynamic libc_setgid setgid "libc.so"
104//go:cgo_import_dynamic libc_sethostname sethostname "libc.so"
105//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
106//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
107//go:cgo_import_dynamic libc_setregid setregid "libc.so"
108//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
109//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
110//go:cgo_import_dynamic libc_setsid setsid "libc.so"
111//go:cgo_import_dynamic libc_setuid setuid "libc.so"
112//go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
113//go:cgo_import_dynamic libc_stat stat "libc.so"
114//go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
115//go:cgo_import_dynamic libc_symlink symlink "libc.so"
116//go:cgo_import_dynamic libc_sync sync "libc.so"
117//go:cgo_import_dynamic libc_times times "libc.so"
118//go:cgo_import_dynamic libc_truncate truncate "libc.so"
119//go:cgo_import_dynamic libc_fsync fsync "libc.so"
120//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
121//go:cgo_import_dynamic libc_umask umask "libc.so"
122//go:cgo_import_dynamic libc_uname uname "libc.so"
123//go:cgo_import_dynamic libc_umount umount "libc.so"
124//go:cgo_import_dynamic libc_unlink unlink "libc.so"
125//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
126//go:cgo_import_dynamic libc_ustat ustat "libc.so"
127//go:cgo_import_dynamic libc_utime utime "libc.so"
128//go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so"
129//go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
130//go:cgo_import_dynamic libc_mmap mmap "libc.so"
131//go:cgo_import_dynamic libc_munmap munmap "libc.so"
132//go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so"
133//go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
134//go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
135//go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
136//go:cgo_import_dynamic libc_write write "libc.so"
137//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
138//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
139//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
140//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
141
142//go:linkname procpipe libc_pipe
143//go:linkname procgetsockname libc_getsockname
144//go:linkname procGetcwd libc_getcwd
145//go:linkname procgetgroups libc_getgroups
146//go:linkname procsetgroups libc_setgroups
147//go:linkname procwait4 libc_wait4
148//go:linkname procgethostname libc_gethostname
149//go:linkname procutimes libc_utimes
150//go:linkname procutimensat libc_utimensat
151//go:linkname procfcntl libc_fcntl
152//go:linkname procfutimesat libc_futimesat
153//go:linkname procaccept libc_accept
154//go:linkname proc__xnet_recvmsg libc___xnet_recvmsg
155//go:linkname proc__xnet_sendmsg libc___xnet_sendmsg
156//go:linkname procacct libc_acct
157//go:linkname proc__makedev libc___makedev
158//go:linkname proc__major libc___major
159//go:linkname proc__minor libc___minor
160//go:linkname procioctl libc_ioctl
161//go:linkname procpoll libc_poll
162//go:linkname procAccess libc_access
163//go:linkname procAdjtime libc_adjtime
164//go:linkname procChdir libc_chdir
165//go:linkname procChmod libc_chmod
166//go:linkname procChown libc_chown
167//go:linkname procChroot libc_chroot
168//go:linkname procClose libc_close
169//go:linkname procCreat libc_creat
170//go:linkname procDup libc_dup
171//go:linkname procDup2 libc_dup2
172//go:linkname procExit libc_exit
173//go:linkname procFaccessat libc_faccessat
174//go:linkname procFchdir libc_fchdir
175//go:linkname procFchmod libc_fchmod
176//go:linkname procFchmodat libc_fchmodat
177//go:linkname procFchown libc_fchown
178//go:linkname procFchownat libc_fchownat
179//go:linkname procFdatasync libc_fdatasync
180//go:linkname procFlock libc_flock
181//go:linkname procFpathconf libc_fpathconf
182//go:linkname procFstat libc_fstat
183//go:linkname procFstatat libc_fstatat
184//go:linkname procFstatvfs libc_fstatvfs
185//go:linkname procGetdents libc_getdents
186//go:linkname procGetgid libc_getgid
187//go:linkname procGetpid libc_getpid
188//go:linkname procGetpgid libc_getpgid
189//go:linkname procGetpgrp libc_getpgrp
190//go:linkname procGeteuid libc_geteuid
191//go:linkname procGetegid libc_getegid
192//go:linkname procGetppid libc_getppid
193//go:linkname procGetpriority libc_getpriority
194//go:linkname procGetrlimit libc_getrlimit
195//go:linkname procGetrusage libc_getrusage
196//go:linkname procGettimeofday libc_gettimeofday
197//go:linkname procGetuid libc_getuid
198//go:linkname procKill libc_kill
199//go:linkname procLchown libc_lchown
200//go:linkname procLink libc_link
201//go:linkname proc__xnet_llisten libc___xnet_llisten
202//go:linkname procLstat libc_lstat
203//go:linkname procMadvise libc_madvise
204//go:linkname procMkdir libc_mkdir
205//go:linkname procMkdirat libc_mkdirat
206//go:linkname procMkfifo libc_mkfifo
207//go:linkname procMkfifoat libc_mkfifoat
208//go:linkname procMknod libc_mknod
209//go:linkname procMknodat libc_mknodat
210//go:linkname procMlock libc_mlock
211//go:linkname procMlockall libc_mlockall
212//go:linkname procMprotect libc_mprotect
213//go:linkname procMsync libc_msync
214//go:linkname procMunlock libc_munlock
215//go:linkname procMunlockall libc_munlockall
216//go:linkname procNanosleep libc_nanosleep
217//go:linkname procOpen libc_open
218//go:linkname procOpenat libc_openat
219//go:linkname procPathconf libc_pathconf
220//go:linkname procPause libc_pause
221//go:linkname procPread libc_pread
222//go:linkname procPwrite libc_pwrite
223//go:linkname procread libc_read
224//go:linkname procReadlink libc_readlink
225//go:linkname procRename libc_rename
226//go:linkname procRenameat libc_renameat
227//go:linkname procRmdir libc_rmdir
228//go:linkname proclseek libc_lseek
229//go:linkname procSelect libc_select
230//go:linkname procSetegid libc_setegid
231//go:linkname procSeteuid libc_seteuid
232//go:linkname procSetgid libc_setgid
233//go:linkname procSethostname libc_sethostname
234//go:linkname procSetpgid libc_setpgid
235//go:linkname procSetpriority libc_setpriority
236//go:linkname procSetregid libc_setregid
237//go:linkname procSetreuid libc_setreuid
238//go:linkname procSetrlimit libc_setrlimit
239//go:linkname procSetsid libc_setsid
240//go:linkname procSetuid libc_setuid
241//go:linkname procshutdown libc_shutdown
242//go:linkname procStat libc_stat
243//go:linkname procStatvfs libc_statvfs
244//go:linkname procSymlink libc_symlink
245//go:linkname procSync libc_sync
246//go:linkname procTimes libc_times
247//go:linkname procTruncate libc_truncate
248//go:linkname procFsync libc_fsync
249//go:linkname procFtruncate libc_ftruncate
250//go:linkname procUmask libc_umask
251//go:linkname procUname libc_uname
252//go:linkname procumount libc_umount
253//go:linkname procUnlink libc_unlink
254//go:linkname procUnlinkat libc_unlinkat
255//go:linkname procUstat libc_ustat
256//go:linkname procUtime libc_utime
257//go:linkname proc__xnet_bind libc___xnet_bind
258//go:linkname proc__xnet_connect libc___xnet_connect
259//go:linkname procmmap libc_mmap
260//go:linkname procmunmap libc_munmap
261//go:linkname procsendfile libc_sendfile
262//go:linkname proc__xnet_sendto libc___xnet_sendto
263//go:linkname proc__xnet_socket libc___xnet_socket
264//go:linkname proc__xnet_socketpair libc___xnet_socketpair
265//go:linkname procwrite libc_write
266//go:linkname proc__xnet_getsockopt libc___xnet_getsockopt
267//go:linkname procgetpeername libc_getpeername
268//go:linkname procsetsockopt libc_setsockopt
269//go:linkname procrecvfrom libc_recvfrom
270
271var (
272 procpipe,
273 procgetsockname,
274 procGetcwd,
275 procgetgroups,
276 procsetgroups,
277 procwait4,
278 procgethostname,
279 procutimes,
280 procutimensat,
281 procfcntl,
282 procfutimesat,
283 procaccept,
284 proc__xnet_recvmsg,
285 proc__xnet_sendmsg,
286 procacct,
287 proc__makedev,
288 proc__major,
289 proc__minor,
290 procioctl,
291 procpoll,
292 procAccess,
293 procAdjtime,
294 procChdir,
295 procChmod,
296 procChown,
297 procChroot,
298 procClose,
299 procCreat,
300 procDup,
301 procDup2,
302 procExit,
303 procFaccessat,
304 procFchdir,
305 procFchmod,
306 procFchmodat,
307 procFchown,
308 procFchownat,
309 procFdatasync,
310 procFlock,
311 procFpathconf,
312 procFstat,
313 procFstatat,
314 procFstatvfs,
315 procGetdents,
316 procGetgid,
317 procGetpid,
318 procGetpgid,
319 procGetpgrp,
320 procGeteuid,
321 procGetegid,
322 procGetppid,
323 procGetpriority,
324 procGetrlimit,
325 procGetrusage,
326 procGettimeofday,
327 procGetuid,
328 procKill,
329 procLchown,
330 procLink,
331 proc__xnet_llisten,
332 procLstat,
333 procMadvise,
334 procMkdir,
335 procMkdirat,
336 procMkfifo,
337 procMkfifoat,
338 procMknod,
339 procMknodat,
340 procMlock,
341 procMlockall,
342 procMprotect,
343 procMsync,
344 procMunlock,
345 procMunlockall,
346 procNanosleep,
347 procOpen,
348 procOpenat,
349 procPathconf,
350 procPause,
351 procPread,
352 procPwrite,
353 procread,
354 procReadlink,
355 procRename,
356 procRenameat,
357 procRmdir,
358 proclseek,
359 procSelect,
360 procSetegid,
361 procSeteuid,
362 procSetgid,
363 procSethostname,
364 procSetpgid,
365 procSetpriority,
366 procSetregid,
367 procSetreuid,
368 procSetrlimit,
369 procSetsid,
370 procSetuid,
371 procshutdown,
372 procStat,
373 procStatvfs,
374 procSymlink,
375 procSync,
376 procTimes,
377 procTruncate,
378 procFsync,
379 procFtruncate,
380 procUmask,
381 procUname,
382 procumount,
383 procUnlink,
384 procUnlinkat,
385 procUstat,
386 procUtime,
387 proc__xnet_bind,
388 proc__xnet_connect,
389 procmmap,
390 procmunmap,
391 procsendfile,
392 proc__xnet_sendto,
393 proc__xnet_socket,
394 proc__xnet_socketpair,
395 procwrite,
396 proc__xnet_getsockopt,
397 procgetpeername,
398 procsetsockopt,
399 procrecvfrom syscallFunc
400)
401
402func pipe(p *[2]_C_int) (n int, err error) {
403 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
404 n = int(r0)
405 if e1 != 0 {
406 err = e1
407 }
408 return
409}
410
411func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
412 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
413 if e1 != 0 {
414 err = e1
415 }
416 return
417}
418
419func Getcwd(buf []byte) (n int, err error) {
420 var _p0 *byte
421 if len(buf) > 0 {
422 _p0 = &buf[0]
423 }
424 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
425 n = int(r0)
426 if e1 != 0 {
427 err = e1
428 }
429 return
430}
431
432func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
433 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
434 n = int(r0)
435 if e1 != 0 {
436 err = e1
437 }
438 return
439}
440
441func setgroups(ngid int, gid *_Gid_t) (err error) {
442 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
443 if e1 != 0 {
444 err = e1
445 }
446 return
447}
448
449func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
450 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
451 wpid = int32(r0)
452 if e1 != 0 {
453 err = e1
454 }
455 return
456}
457
458func gethostname(buf []byte) (n int, err error) {
459 var _p0 *byte
460 if len(buf) > 0 {
461 _p0 = &buf[0]
462 }
463 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
464 n = int(r0)
465 if e1 != 0 {
466 err = e1
467 }
468 return
469}
470
471func utimes(path string, times *[2]Timeval) (err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
478 if e1 != 0 {
479 err = e1
480 }
481 return
482}
483
484func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
485 var _p0 *byte
486 _p0, err = BytePtrFromString(path)
487 if err != nil {
488 return
489 }
490 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
491 if e1 != 0 {
492 err = e1
493 }
494 return
495}
496
497func fcntl(fd int, cmd int, arg int) (val int, err error) {
498 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
499 val = int(r0)
500 if e1 != 0 {
501 err = e1
502 }
503 return
504}
505
506func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
507 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
508 if e1 != 0 {
509 err = e1
510 }
511 return
512}
513
514func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
515 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
516 fd = int(r0)
517 if e1 != 0 {
518 err = e1
519 }
520 return
521}
522
523func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
524 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
525 n = int(r0)
526 if e1 != 0 {
527 err = e1
528 }
529 return
530}
531
532func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
533 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
534 n = int(r0)
535 if e1 != 0 {
536 err = e1
537 }
538 return
539}
540
541func acct(path *byte) (err error) {
542 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
543 if e1 != 0 {
544 err = e1
545 }
546 return
547}
548
549func __makedev(version int, major uint, minor uint) (val uint64) {
550 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0)
551 val = uint64(r0)
552 return
553}
554
555func __major(version int, dev uint64) (val uint) {
556 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
557 val = uint(r0)
558 return
559}
560
561func __minor(version int, dev uint64) (val uint) {
562 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
563 val = uint(r0)
564 return
565}
566
567func ioctl(fd int, req uint, arg uintptr) (err error) {
568 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
569 if e1 != 0 {
570 err = e1
571 }
572 return
573}
574
575func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
576 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)
577 n = int(r0)
578 if e1 != 0 {
579 err = e1
580 }
581 return
582}
583
584func Access(path string, mode uint32) (err error) {
585 var _p0 *byte
586 _p0, err = BytePtrFromString(path)
587 if err != nil {
588 return
589 }
590 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
591 if e1 != 0 {
592 err = e1
593 }
594 return
595}
596
597func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
598 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
599 if e1 != 0 {
600 err = e1
601 }
602 return
603}
604
605func Chdir(path string) (err error) {
606 var _p0 *byte
607 _p0, err = BytePtrFromString(path)
608 if err != nil {
609 return
610 }
611 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
612 if e1 != 0 {
613 err = e1
614 }
615 return
616}
617
618func Chmod(path string, mode uint32) (err error) {
619 var _p0 *byte
620 _p0, err = BytePtrFromString(path)
621 if err != nil {
622 return
623 }
624 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
625 if e1 != 0 {
626 err = e1
627 }
628 return
629}
630
631func Chown(path string, uid int, gid int) (err error) {
632 var _p0 *byte
633 _p0, err = BytePtrFromString(path)
634 if err != nil {
635 return
636 }
637 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
638 if e1 != 0 {
639 err = e1
640 }
641 return
642}
643
644func Chroot(path string) (err error) {
645 var _p0 *byte
646 _p0, err = BytePtrFromString(path)
647 if err != nil {
648 return
649 }
650 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
651 if e1 != 0 {
652 err = e1
653 }
654 return
655}
656
657func Close(fd int) (err error) {
658 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
659 if e1 != 0 {
660 err = e1
661 }
662 return
663}
664
665func Creat(path string, mode uint32) (fd int, err error) {
666 var _p0 *byte
667 _p0, err = BytePtrFromString(path)
668 if err != nil {
669 return
670 }
671 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
672 fd = int(r0)
673 if e1 != 0 {
674 err = e1
675 }
676 return
677}
678
679func Dup(fd int) (nfd int, err error) {
680 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
681 nfd = int(r0)
682 if e1 != 0 {
683 err = e1
684 }
685 return
686}
687
688func Dup2(oldfd int, newfd int) (err error) {
689 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
690 if e1 != 0 {
691 err = e1
692 }
693 return
694}
695
696func Exit(code int) {
697 sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
698 return
699}
700
701func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
702 var _p0 *byte
703 _p0, err = BytePtrFromString(path)
704 if err != nil {
705 return
706 }
707 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
708 if e1 != 0 {
709 err = e1
710 }
711 return
712}
713
714func Fchdir(fd int) (err error) {
715 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
716 if e1 != 0 {
717 err = e1
718 }
719 return
720}
721
722func Fchmod(fd int, mode uint32) (err error) {
723 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
724 if e1 != 0 {
725 err = e1
726 }
727 return
728}
729
730func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
731 var _p0 *byte
732 _p0, err = BytePtrFromString(path)
733 if err != nil {
734 return
735 }
736 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
737 if e1 != 0 {
738 err = e1
739 }
740 return
741}
742
743func Fchown(fd int, uid int, gid int) (err error) {
744 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
745 if e1 != 0 {
746 err = e1
747 }
748 return
749}
750
751func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
752 var _p0 *byte
753 _p0, err = BytePtrFromString(path)
754 if err != nil {
755 return
756 }
757 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
758 if e1 != 0 {
759 err = e1
760 }
761 return
762}
763
764func Fdatasync(fd int) (err error) {
765 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
766 if e1 != 0 {
767 err = e1
768 }
769 return
770}
771
772func Flock(fd int, how int) (err error) {
773 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
774 if e1 != 0 {
775 err = e1
776 }
777 return
778}
779
780func Fpathconf(fd int, name int) (val int, err error) {
781 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
782 val = int(r0)
783 if e1 != 0 {
784 err = e1
785 }
786 return
787}
788
789func Fstat(fd int, stat *Stat_t) (err error) {
790 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
791 if e1 != 0 {
792 err = e1
793 }
794 return
795}
796
797func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
798 var _p0 *byte
799 _p0, err = BytePtrFromString(path)
800 if err != nil {
801 return
802 }
803 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
804 if e1 != 0 {
805 err = e1
806 }
807 return
808}
809
810func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
811 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
812 if e1 != 0 {
813 err = e1
814 }
815 return
816}
817
818func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
819 var _p0 *byte
820 if len(buf) > 0 {
821 _p0 = &buf[0]
822 }
823 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
824 n = int(r0)
825 if e1 != 0 {
826 err = e1
827 }
828 return
829}
830
831func Getgid() (gid int) {
832 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
833 gid = int(r0)
834 return
835}
836
837func Getpid() (pid int) {
838 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
839 pid = int(r0)
840 return
841}
842
843func Getpgid(pid int) (pgid int, err error) {
844 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
845 pgid = int(r0)
846 if e1 != 0 {
847 err = e1
848 }
849 return
850}
851
852func Getpgrp() (pgid int, err error) {
853 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
854 pgid = int(r0)
855 if e1 != 0 {
856 err = e1
857 }
858 return
859}
860
861func Geteuid() (euid int) {
862 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
863 euid = int(r0)
864 return
865}
866
867func Getegid() (egid int) {
868 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
869 egid = int(r0)
870 return
871}
872
873func Getppid() (ppid int) {
874 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
875 ppid = int(r0)
876 return
877}
878
879func Getpriority(which int, who int) (n int, err error) {
880 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
881 n = int(r0)
882 if e1 != 0 {
883 err = e1
884 }
885 return
886}
887
888func Getrlimit(which int, lim *Rlimit) (err error) {
889 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
890 if e1 != 0 {
891 err = e1
892 }
893 return
894}
895
896func Getrusage(who int, rusage *Rusage) (err error) {
897 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
898 if e1 != 0 {
899 err = e1
900 }
901 return
902}
903
904func Gettimeofday(tv *Timeval) (err error) {
905 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
906 if e1 != 0 {
907 err = e1
908 }
909 return
910}
911
912func Getuid() (uid int) {
913 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
914 uid = int(r0)
915 return
916}
917
918func Kill(pid int, signum syscall.Signal) (err error) {
919 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
920 if e1 != 0 {
921 err = e1
922 }
923 return
924}
925
926func Lchown(path string, uid int, gid int) (err error) {
927 var _p0 *byte
928 _p0, err = BytePtrFromString(path)
929 if err != nil {
930 return
931 }
932 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
933 if e1 != 0 {
934 err = e1
935 }
936 return
937}
938
939func Link(path string, link string) (err error) {
940 var _p0 *byte
941 _p0, err = BytePtrFromString(path)
942 if err != nil {
943 return
944 }
945 var _p1 *byte
946 _p1, err = BytePtrFromString(link)
947 if err != nil {
948 return
949 }
950 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
951 if e1 != 0 {
952 err = e1
953 }
954 return
955}
956
957func Listen(s int, backlog int) (err error) {
958 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
959 if e1 != 0 {
960 err = e1
961 }
962 return
963}
964
965func Lstat(path string, stat *Stat_t) (err error) {
966 var _p0 *byte
967 _p0, err = BytePtrFromString(path)
968 if err != nil {
969 return
970 }
971 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
972 if e1 != 0 {
973 err = e1
974 }
975 return
976}
977
978func Madvise(b []byte, advice int) (err error) {
979 var _p0 *byte
980 if len(b) > 0 {
981 _p0 = &b[0]
982 }
983 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
984 if e1 != 0 {
985 err = e1
986 }
987 return
988}
989
990func Mkdir(path string, mode uint32) (err error) {
991 var _p0 *byte
992 _p0, err = BytePtrFromString(path)
993 if err != nil {
994 return
995 }
996 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
997 if e1 != 0 {
998 err = e1
999 }
1000 return
1001}
1002
1003func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1004 var _p0 *byte
1005 _p0, err = BytePtrFromString(path)
1006 if err != nil {
1007 return
1008 }
1009 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
1010 if e1 != 0 {
1011 err = e1
1012 }
1013 return
1014}
1015
1016func Mkfifo(path string, mode uint32) (err error) {
1017 var _p0 *byte
1018 _p0, err = BytePtrFromString(path)
1019 if err != nil {
1020 return
1021 }
1022 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
1023 if e1 != 0 {
1024 err = e1
1025 }
1026 return
1027}
1028
1029func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1030 var _p0 *byte
1031 _p0, err = BytePtrFromString(path)
1032 if err != nil {
1033 return
1034 }
1035 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
1036 if e1 != 0 {
1037 err = e1
1038 }
1039 return
1040}
1041
1042func Mknod(path string, mode uint32, dev int) (err error) {
1043 var _p0 *byte
1044 _p0, err = BytePtrFromString(path)
1045 if err != nil {
1046 return
1047 }
1048 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
1049 if e1 != 0 {
1050 err = e1
1051 }
1052 return
1053}
1054
1055func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1056 var _p0 *byte
1057 _p0, err = BytePtrFromString(path)
1058 if err != nil {
1059 return
1060 }
1061 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1062 if e1 != 0 {
1063 err = e1
1064 }
1065 return
1066}
1067
1068func Mlock(b []byte) (err error) {
1069 var _p0 *byte
1070 if len(b) > 0 {
1071 _p0 = &b[0]
1072 }
1073 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
1074 if e1 != 0 {
1075 err = e1
1076 }
1077 return
1078}
1079
1080func Mlockall(flags int) (err error) {
1081 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
1082 if e1 != 0 {
1083 err = e1
1084 }
1085 return
1086}
1087
1088func Mprotect(b []byte, prot int) (err error) {
1089 var _p0 *byte
1090 if len(b) > 0 {
1091 _p0 = &b[0]
1092 }
1093 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
1094 if e1 != 0 {
1095 err = e1
1096 }
1097 return
1098}
1099
1100func Msync(b []byte, flags int) (err error) {
1101 var _p0 *byte
1102 if len(b) > 0 {
1103 _p0 = &b[0]
1104 }
1105 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0)
1106 if e1 != 0 {
1107 err = e1
1108 }
1109 return
1110}
1111
1112func Munlock(b []byte) (err error) {
1113 var _p0 *byte
1114 if len(b) > 0 {
1115 _p0 = &b[0]
1116 }
1117 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
1118 if e1 != 0 {
1119 err = e1
1120 }
1121 return
1122}
1123
1124func Munlockall() (err error) {
1125 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
1126 if e1 != 0 {
1127 err = e1
1128 }
1129 return
1130}
1131
1132func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1133 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
1134 if e1 != 0 {
1135 err = e1
1136 }
1137 return
1138}
1139
1140func Open(path string, mode int, perm uint32) (fd int, err error) {
1141 var _p0 *byte
1142 _p0, err = BytePtrFromString(path)
1143 if err != nil {
1144 return
1145 }
1146 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
1147 fd = int(r0)
1148 if e1 != 0 {
1149 err = e1
1150 }
1151 return
1152}
1153
1154func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
1155 var _p0 *byte
1156 _p0, err = BytePtrFromString(path)
1157 if err != nil {
1158 return
1159 }
1160 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
1161 fd = int(r0)
1162 if e1 != 0 {
1163 err = e1
1164 }
1165 return
1166}
1167
1168func Pathconf(path string, name int) (val int, err error) {
1169 var _p0 *byte
1170 _p0, err = BytePtrFromString(path)
1171 if err != nil {
1172 return
1173 }
1174 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
1175 val = int(r0)
1176 if e1 != 0 {
1177 err = e1
1178 }
1179 return
1180}
1181
1182func Pause() (err error) {
1183 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
1184 if e1 != 0 {
1185 err = e1
1186 }
1187 return
1188}
1189
1190func Pread(fd int, p []byte, offset int64) (n int, err error) {
1191 var _p0 *byte
1192 if len(p) > 0 {
1193 _p0 = &p[0]
1194 }
1195 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
1196 n = int(r0)
1197 if e1 != 0 {
1198 err = e1
1199 }
1200 return
1201}
1202
1203func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1204 var _p0 *byte
1205 if len(p) > 0 {
1206 _p0 = &p[0]
1207 }
1208 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
1209 n = int(r0)
1210 if e1 != 0 {
1211 err = e1
1212 }
1213 return
1214}
1215
1216func read(fd int, p []byte) (n int, err error) {
1217 var _p0 *byte
1218 if len(p) > 0 {
1219 _p0 = &p[0]
1220 }
1221 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
1222 n = int(r0)
1223 if e1 != 0 {
1224 err = e1
1225 }
1226 return
1227}
1228
1229func Readlink(path string, buf []byte) (n int, err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 *byte
1236 if len(buf) > 0 {
1237 _p1 = &buf[0]
1238 }
1239 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
1240 n = int(r0)
1241 if e1 != 0 {
1242 err = e1
1243 }
1244 return
1245}
1246
1247func Rename(from string, to string) (err error) {
1248 var _p0 *byte
1249 _p0, err = BytePtrFromString(from)
1250 if err != nil {
1251 return
1252 }
1253 var _p1 *byte
1254 _p1, err = BytePtrFromString(to)
1255 if err != nil {
1256 return
1257 }
1258 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
1259 if e1 != 0 {
1260 err = e1
1261 }
1262 return
1263}
1264
1265func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1266 var _p0 *byte
1267 _p0, err = BytePtrFromString(oldpath)
1268 if err != nil {
1269 return
1270 }
1271 var _p1 *byte
1272 _p1, err = BytePtrFromString(newpath)
1273 if err != nil {
1274 return
1275 }
1276 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1277 if e1 != 0 {
1278 err = e1
1279 }
1280 return
1281}
1282
1283func Rmdir(path string) (err error) {
1284 var _p0 *byte
1285 _p0, err = BytePtrFromString(path)
1286 if err != nil {
1287 return
1288 }
1289 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
1290 if e1 != 0 {
1291 err = e1
1292 }
1293 return
1294}
1295
1296func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1297 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
1298 newoffset = int64(r0)
1299 if e1 != 0 {
1300 err = e1
1301 }
1302 return
1303}
1304
1305func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1306 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1307 if e1 != 0 {
1308 err = e1
1309 }
1310 return
1311}
1312
1313func Setegid(egid int) (err error) {
1314 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
1315 if e1 != 0 {
1316 err = e1
1317 }
1318 return
1319}
1320
1321func Seteuid(euid int) (err error) {
1322 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
1323 if e1 != 0 {
1324 err = e1
1325 }
1326 return
1327}
1328
1329func Setgid(gid int) (err error) {
1330 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
1331 if e1 != 0 {
1332 err = e1
1333 }
1334 return
1335}
1336
1337func Sethostname(p []byte) (err error) {
1338 var _p0 *byte
1339 if len(p) > 0 {
1340 _p0 = &p[0]
1341 }
1342 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
1343 if e1 != 0 {
1344 err = e1
1345 }
1346 return
1347}
1348
1349func Setpgid(pid int, pgid int) (err error) {
1350 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
1351 if e1 != 0 {
1352 err = e1
1353 }
1354 return
1355}
1356
1357func Setpriority(which int, who int, prio int) (err error) {
1358 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
1359 if e1 != 0 {
1360 err = e1
1361 }
1362 return
1363}
1364
1365func Setregid(rgid int, egid int) (err error) {
1366 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
1367 if e1 != 0 {
1368 err = e1
1369 }
1370 return
1371}
1372
1373func Setreuid(ruid int, euid int) (err error) {
1374 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
1375 if e1 != 0 {
1376 err = e1
1377 }
1378 return
1379}
1380
1381func Setrlimit(which int, lim *Rlimit) (err error) {
1382 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
1383 if e1 != 0 {
1384 err = e1
1385 }
1386 return
1387}
1388
1389func Setsid() (pid int, err error) {
1390 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
1391 pid = int(r0)
1392 if e1 != 0 {
1393 err = e1
1394 }
1395 return
1396}
1397
1398func Setuid(uid int) (err error) {
1399 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
1400 if e1 != 0 {
1401 err = e1
1402 }
1403 return
1404}
1405
1406func Shutdown(s int, how int) (err error) {
1407 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
1408 if e1 != 0 {
1409 err = e1
1410 }
1411 return
1412}
1413
1414func Stat(path string, stat *Stat_t) (err error) {
1415 var _p0 *byte
1416 _p0, err = BytePtrFromString(path)
1417 if err != nil {
1418 return
1419 }
1420 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
1421 if e1 != 0 {
1422 err = e1
1423 }
1424 return
1425}
1426
1427func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
1428 var _p0 *byte
1429 _p0, err = BytePtrFromString(path)
1430 if err != nil {
1431 return
1432 }
1433 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
1434 if e1 != 0 {
1435 err = e1
1436 }
1437 return
1438}
1439
1440func Symlink(path string, link string) (err error) {
1441 var _p0 *byte
1442 _p0, err = BytePtrFromString(path)
1443 if err != nil {
1444 return
1445 }
1446 var _p1 *byte
1447 _p1, err = BytePtrFromString(link)
1448 if err != nil {
1449 return
1450 }
1451 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
1452 if e1 != 0 {
1453 err = e1
1454 }
1455 return
1456}
1457
1458func Sync() (err error) {
1459 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
1460 if e1 != 0 {
1461 err = e1
1462 }
1463 return
1464}
1465
1466func Times(tms *Tms) (ticks uintptr, err error) {
1467 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
1468 ticks = uintptr(r0)
1469 if e1 != 0 {
1470 err = e1
1471 }
1472 return
1473}
1474
1475func Truncate(path string, length int64) (err error) {
1476 var _p0 *byte
1477 _p0, err = BytePtrFromString(path)
1478 if err != nil {
1479 return
1480 }
1481 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
1482 if e1 != 0 {
1483 err = e1
1484 }
1485 return
1486}
1487
1488func Fsync(fd int) (err error) {
1489 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
1490 if e1 != 0 {
1491 err = e1
1492 }
1493 return
1494}
1495
1496func Ftruncate(fd int, length int64) (err error) {
1497 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
1498 if e1 != 0 {
1499 err = e1
1500 }
1501 return
1502}
1503
1504func Umask(mask int) (oldmask int) {
1505 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
1506 oldmask = int(r0)
1507 return
1508}
1509
1510func Uname(buf *Utsname) (err error) {
1511 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
1512 if e1 != 0 {
1513 err = e1
1514 }
1515 return
1516}
1517
1518func Unmount(target string, flags int) (err error) {
1519 var _p0 *byte
1520 _p0, err = BytePtrFromString(target)
1521 if err != nil {
1522 return
1523 }
1524 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
1525 if e1 != 0 {
1526 err = e1
1527 }
1528 return
1529}
1530
1531func Unlink(path string) (err error) {
1532 var _p0 *byte
1533 _p0, err = BytePtrFromString(path)
1534 if err != nil {
1535 return
1536 }
1537 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
1538 if e1 != 0 {
1539 err = e1
1540 }
1541 return
1542}
1543
1544func Unlinkat(dirfd int, path string, flags int) (err error) {
1545 var _p0 *byte
1546 _p0, err = BytePtrFromString(path)
1547 if err != nil {
1548 return
1549 }
1550 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
1551 if e1 != 0 {
1552 err = e1
1553 }
1554 return
1555}
1556
1557func Ustat(dev int, ubuf *Ustat_t) (err error) {
1558 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
1559 if e1 != 0 {
1560 err = e1
1561 }
1562 return
1563}
1564
1565func Utime(path string, buf *Utimbuf) (err error) {
1566 var _p0 *byte
1567 _p0, err = BytePtrFromString(path)
1568 if err != nil {
1569 return
1570 }
1571 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
1572 if e1 != 0 {
1573 err = e1
1574 }
1575 return
1576}
1577
1578func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1579 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
1580 if e1 != 0 {
1581 err = e1
1582 }
1583 return
1584}
1585
1586func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1587 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
1588 if e1 != 0 {
1589 err = e1
1590 }
1591 return
1592}
1593
1594func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1595 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1596 ret = uintptr(r0)
1597 if e1 != 0 {
1598 err = e1
1599 }
1600 return
1601}
1602
1603func munmap(addr uintptr, length uintptr) (err error) {
1604 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
1605 if e1 != 0 {
1606 err = e1
1607 }
1608 return
1609}
1610
1611func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1612 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
1613 written = int(r0)
1614 if e1 != 0 {
1615 err = e1
1616 }
1617 return
1618}
1619
1620func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
1621 var _p0 *byte
1622 if len(buf) > 0 {
1623 _p0 = &buf[0]
1624 }
1625 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
1626 if e1 != 0 {
1627 err = e1
1628 }
1629 return
1630}
1631
1632func socket(domain int, typ int, proto int) (fd int, err error) {
1633 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
1634 fd = int(r0)
1635 if e1 != 0 {
1636 err = e1
1637 }
1638 return
1639}
1640
1641func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
1642 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
1643 if e1 != 0 {
1644 err = e1
1645 }
1646 return
1647}
1648
1649func write(fd int, p []byte) (n int, err error) {
1650 var _p0 *byte
1651 if len(p) > 0 {
1652 _p0 = &p[0]
1653 }
1654 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
1655 n = int(r0)
1656 if e1 != 0 {
1657 err = e1
1658 }
1659 return
1660}
1661
1662func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
1663 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
1664 if e1 != 0 {
1665 err = e1
1666 }
1667 return
1668}
1669
1670func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1671 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
1672 if e1 != 0 {
1673 err = e1
1674 }
1675 return
1676}
1677
1678func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
1679 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
1680 if e1 != 0 {
1681 err = e1
1682 }
1683 return
1684}
1685
1686func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
1687 var _p0 *byte
1688 if len(p) > 0 {
1689 _p0 = &p[0]
1690 }
1691 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
1692 n = int(r0)
1693 if e1 != 0 {
1694 err = e1
1695 }
1696 return
1697}