github.com/code-reading/golang@v0.0.0-20220303082512-ba5bc0e589a3/go/src/syscall/zsyscall_solaris_amd64.go (about) 1 // mksyscall_libc.pl -solaris -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go 2 // Code generated by the command above; DO NOT EDIT. 3 4 //go:build solaris && amd64 5 // +build solaris,amd64 6 7 package syscall 8 9 import "unsafe" 10 11 //go:cgo_import_dynamic libc_Getcwd getcwd "libc.so" 12 //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" 13 //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" 14 //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" 15 //go:cgo_import_dynamic libc_accept accept "libsocket.so" 16 //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" 17 //go:cgo_import_dynamic libc_Access access "libc.so" 18 //go:cgo_import_dynamic libc_Adjtime adjtime "libc.so" 19 //go:cgo_import_dynamic libc_Chdir chdir "libc.so" 20 //go:cgo_import_dynamic libc_Chmod chmod "libc.so" 21 //go:cgo_import_dynamic libc_Chown chown "libc.so" 22 //go:cgo_import_dynamic libc_Chroot chroot "libc.so" 23 //go:cgo_import_dynamic libc_Close close "libc.so" 24 //go:cgo_import_dynamic libc_Dup dup "libc.so" 25 //go:cgo_import_dynamic libc_Fchdir fchdir "libc.so" 26 //go:cgo_import_dynamic libc_Fchmod fchmod "libc.so" 27 //go:cgo_import_dynamic libc_Fchown fchown "libc.so" 28 //go:cgo_import_dynamic libc_Fpathconf fpathconf "libc.so" 29 //go:cgo_import_dynamic libc_Fstat fstat "libc.so" 30 //go:cgo_import_dynamic libc_Getdents getdents "libc.so" 31 //go:cgo_import_dynamic libc_Getgid getgid "libc.so" 32 //go:cgo_import_dynamic libc_Getpid getpid "libc.so" 33 //go:cgo_import_dynamic libc_Geteuid geteuid "libc.so" 34 //go:cgo_import_dynamic libc_Getegid getegid "libc.so" 35 //go:cgo_import_dynamic libc_Getppid getppid "libc.so" 36 //go:cgo_import_dynamic libc_Getpriority getpriority "libc.so" 37 //go:cgo_import_dynamic libc_Getrlimit getrlimit "libc.so" 38 //go:cgo_import_dynamic libc_Gettimeofday gettimeofday "libc.so" 39 //go:cgo_import_dynamic libc_Getuid getuid "libc.so" 40 //go:cgo_import_dynamic libc_Kill kill "libc.so" 41 //go:cgo_import_dynamic libc_Lchown lchown "libc.so" 42 //go:cgo_import_dynamic libc_Link link "libc.so" 43 //go:cgo_import_dynamic libc___xnet_listen __xnet_listen "libsocket.so" 44 //go:cgo_import_dynamic libc_Lstat lstat "libc.so" 45 //go:cgo_import_dynamic libc_Mkdir mkdir "libc.so" 46 //go:cgo_import_dynamic libc_Mknod mknod "libc.so" 47 //go:cgo_import_dynamic libc_Nanosleep nanosleep "libc.so" 48 //go:cgo_import_dynamic libc_Open open "libc.so" 49 //go:cgo_import_dynamic libc_Pathconf pathconf "libc.so" 50 //go:cgo_import_dynamic libc_Pread pread "libc.so" 51 //go:cgo_import_dynamic libc_Pwrite pwrite "libc.so" 52 //go:cgo_import_dynamic libc_read read "libc.so" 53 //go:cgo_import_dynamic libc_Readlink readlink "libc.so" 54 //go:cgo_import_dynamic libc_Rename rename "libc.so" 55 //go:cgo_import_dynamic libc_Rmdir rmdir "libc.so" 56 //go:cgo_import_dynamic libc_lseek lseek "libc.so" 57 //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so" 58 //go:cgo_import_dynamic libc_Setegid setegid "libc.so" 59 //go:cgo_import_dynamic libc_Seteuid seteuid "libc.so" 60 //go:cgo_import_dynamic libc_Setgid setgid "libc.so" 61 //go:cgo_import_dynamic libc_Setpgid setpgid "libc.so" 62 //go:cgo_import_dynamic libc_Setpriority setpriority "libc.so" 63 //go:cgo_import_dynamic libc_Setregid setregid "libc.so" 64 //go:cgo_import_dynamic libc_Setreuid setreuid "libc.so" 65 //go:cgo_import_dynamic libc_Setrlimit setrlimit "libc.so" 66 //go:cgo_import_dynamic libc_Setsid setsid "libc.so" 67 //go:cgo_import_dynamic libc_Setuid setuid "libc.so" 68 //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" 69 //go:cgo_import_dynamic libc_Stat stat "libc.so" 70 //go:cgo_import_dynamic libc_Symlink symlink "libc.so" 71 //go:cgo_import_dynamic libc_Sync sync "libc.so" 72 //go:cgo_import_dynamic libc_Truncate truncate "libc.so" 73 //go:cgo_import_dynamic libc_Fsync fsync "libc.so" 74 //go:cgo_import_dynamic libc_Ftruncate ftruncate "libc.so" 75 //go:cgo_import_dynamic libc_Umask umask "libc.so" 76 //go:cgo_import_dynamic libc_Unlink unlink "libc.so" 77 //go:cgo_import_dynamic libc_utimes utimes "libc.so" 78 //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so" 79 //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so" 80 //go:cgo_import_dynamic libc_mmap mmap "libc.so" 81 //go:cgo_import_dynamic libc_munmap munmap "libc.so" 82 //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so" 83 //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so" 84 //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so" 85 //go:cgo_import_dynamic libc_write write "libc.so" 86 //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so" 87 //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" 88 //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so" 89 //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" 90 //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" 91 //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" 92 //go:cgo_import_dynamic libc_getexecname getexecname "libc.so" 93 //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" 94 95 //go:linkname libc_Getcwd libc_Getcwd 96 //go:linkname libc_getgroups libc_getgroups 97 //go:linkname libc_setgroups libc_setgroups 98 //go:linkname libc_fcntl libc_fcntl 99 //go:linkname libc_accept libc_accept 100 //go:linkname libc___xnet_sendmsg libc___xnet_sendmsg 101 //go:linkname libc_Access libc_Access 102 //go:linkname libc_Adjtime libc_Adjtime 103 //go:linkname libc_Chdir libc_Chdir 104 //go:linkname libc_Chmod libc_Chmod 105 //go:linkname libc_Chown libc_Chown 106 //go:linkname libc_Chroot libc_Chroot 107 //go:linkname libc_Close libc_Close 108 //go:linkname libc_Dup libc_Dup 109 //go:linkname libc_Fchdir libc_Fchdir 110 //go:linkname libc_Fchmod libc_Fchmod 111 //go:linkname libc_Fchown libc_Fchown 112 //go:linkname libc_Fpathconf libc_Fpathconf 113 //go:linkname libc_Fstat libc_Fstat 114 //go:linkname libc_Getdents libc_Getdents 115 //go:linkname libc_Getgid libc_Getgid 116 //go:linkname libc_Getpid libc_Getpid 117 //go:linkname libc_Geteuid libc_Geteuid 118 //go:linkname libc_Getegid libc_Getegid 119 //go:linkname libc_Getppid libc_Getppid 120 //go:linkname libc_Getpriority libc_Getpriority 121 //go:linkname libc_Getrlimit libc_Getrlimit 122 //go:linkname libc_Gettimeofday libc_Gettimeofday 123 //go:linkname libc_Getuid libc_Getuid 124 //go:linkname libc_Kill libc_Kill 125 //go:linkname libc_Lchown libc_Lchown 126 //go:linkname libc_Link libc_Link 127 //go:linkname libc___xnet_listen libc___xnet_listen 128 //go:linkname libc_Lstat libc_Lstat 129 //go:linkname libc_Mkdir libc_Mkdir 130 //go:linkname libc_Mknod libc_Mknod 131 //go:linkname libc_Nanosleep libc_Nanosleep 132 //go:linkname libc_Open libc_Open 133 //go:linkname libc_Pathconf libc_Pathconf 134 //go:linkname libc_Pread libc_Pread 135 //go:linkname libc_Pwrite libc_Pwrite 136 //go:linkname libc_read libc_read 137 //go:linkname libc_Readlink libc_Readlink 138 //go:linkname libc_Rename libc_Rename 139 //go:linkname libc_Rmdir libc_Rmdir 140 //go:linkname libc_lseek libc_lseek 141 //go:linkname libc_sendfile libc_sendfile 142 //go:linkname libc_Setegid libc_Setegid 143 //go:linkname libc_Seteuid libc_Seteuid 144 //go:linkname libc_Setgid libc_Setgid 145 //go:linkname libc_Setpgid libc_Setpgid 146 //go:linkname libc_Setpriority libc_Setpriority 147 //go:linkname libc_Setregid libc_Setregid 148 //go:linkname libc_Setreuid libc_Setreuid 149 //go:linkname libc_Setrlimit libc_Setrlimit 150 //go:linkname libc_Setsid libc_Setsid 151 //go:linkname libc_Setuid libc_Setuid 152 //go:linkname libc_shutdown libc_shutdown 153 //go:linkname libc_Stat libc_Stat 154 //go:linkname libc_Symlink libc_Symlink 155 //go:linkname libc_Sync libc_Sync 156 //go:linkname libc_Truncate libc_Truncate 157 //go:linkname libc_Fsync libc_Fsync 158 //go:linkname libc_Ftruncate libc_Ftruncate 159 //go:linkname libc_Umask libc_Umask 160 //go:linkname libc_Unlink libc_Unlink 161 //go:linkname libc_utimes libc_utimes 162 //go:linkname libc___xnet_bind libc___xnet_bind 163 //go:linkname libc___xnet_connect libc___xnet_connect 164 //go:linkname libc_mmap libc_mmap 165 //go:linkname libc_munmap libc_munmap 166 //go:linkname libc___xnet_sendto libc___xnet_sendto 167 //go:linkname libc___xnet_socket libc___xnet_socket 168 //go:linkname libc___xnet_socketpair libc___xnet_socketpair 169 //go:linkname libc_write libc_write 170 //go:linkname libc___xnet_getsockopt libc___xnet_getsockopt 171 //go:linkname libc_getpeername libc_getpeername 172 //go:linkname libc_getsockname libc_getsockname 173 //go:linkname libc_setsockopt libc_setsockopt 174 //go:linkname libc_recvfrom libc_recvfrom 175 //go:linkname libc___xnet_recvmsg libc___xnet_recvmsg 176 //go:linkname libc_getexecname libc_getexecname 177 //go:linkname libc_utimensat libc_utimensat 178 179 type libcFunc uintptr 180 181 var ( 182 libc_Getcwd, 183 libc_getgroups, 184 libc_setgroups, 185 libc_fcntl, 186 libc_accept, 187 libc___xnet_sendmsg, 188 libc_Access, 189 libc_Adjtime, 190 libc_Chdir, 191 libc_Chmod, 192 libc_Chown, 193 libc_Chroot, 194 libc_Close, 195 libc_Dup, 196 libc_Fchdir, 197 libc_Fchmod, 198 libc_Fchown, 199 libc_Fpathconf, 200 libc_Fstat, 201 libc_Getdents, 202 libc_Getgid, 203 libc_Getpid, 204 libc_Geteuid, 205 libc_Getegid, 206 libc_Getppid, 207 libc_Getpriority, 208 libc_Getrlimit, 209 libc_Gettimeofday, 210 libc_Getuid, 211 libc_Kill, 212 libc_Lchown, 213 libc_Link, 214 libc___xnet_listen, 215 libc_Lstat, 216 libc_Mkdir, 217 libc_Mknod, 218 libc_Nanosleep, 219 libc_Open, 220 libc_Pathconf, 221 libc_Pread, 222 libc_Pwrite, 223 libc_read, 224 libc_Readlink, 225 libc_Rename, 226 libc_Rmdir, 227 libc_lseek, 228 libc_sendfile, 229 libc_Setegid, 230 libc_Seteuid, 231 libc_Setgid, 232 libc_Setpgid, 233 libc_Setpriority, 234 libc_Setregid, 235 libc_Setreuid, 236 libc_Setrlimit, 237 libc_Setsid, 238 libc_Setuid, 239 libc_shutdown, 240 libc_Stat, 241 libc_Symlink, 242 libc_Sync, 243 libc_Truncate, 244 libc_Fsync, 245 libc_Ftruncate, 246 libc_Umask, 247 libc_Unlink, 248 libc_utimes, 249 libc___xnet_bind, 250 libc___xnet_connect, 251 libc_mmap, 252 libc_munmap, 253 libc___xnet_sendto, 254 libc___xnet_socket, 255 libc___xnet_socketpair, 256 libc_write, 257 libc___xnet_getsockopt, 258 libc_getpeername, 259 libc_getsockname, 260 libc_setsockopt, 261 libc_recvfrom, 262 libc___xnet_recvmsg, 263 libc_getexecname, 264 libc_utimensat libcFunc 265 ) 266 267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 268 269 func Getcwd(buf []byte) (n int, err error) { 270 var _p0 *byte 271 if len(buf) > 0 { 272 _p0 = &buf[0] 273 } 274 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0) 275 n = int(r0) 276 if e1 != 0 { 277 err = errnoErr(e1) 278 } 279 return 280 } 281 282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 283 284 func getgroups(ngid int, gid *_Gid_t) (n int, err error) { 285 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) 286 n = int(r0) 287 if e1 != 0 { 288 err = errnoErr(e1) 289 } 290 return 291 } 292 293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 294 295 func setgroups(ngid int, gid *_Gid_t) (err error) { 296 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) 297 if e1 != 0 { 298 err = errnoErr(e1) 299 } 300 return 301 } 302 303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 304 305 func fcntl(fd int, cmd int, arg int) (val int, err error) { 306 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) 307 val = int(r0) 308 if e1 != 0 { 309 err = errnoErr(e1) 310 } 311 return 312 } 313 314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 315 316 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 317 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 318 fd = int(r0) 319 if e1 != 0 { 320 err = errnoErr(e1) 321 } 322 return 323 } 324 325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 326 327 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 328 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) 329 n = int(r0) 330 if e1 != 0 { 331 err = errnoErr(e1) 332 } 333 return 334 } 335 336 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 337 338 func Access(path string, mode uint32) (err error) { 339 var _p0 *byte 340 _p0, err = BytePtrFromString(path) 341 if err != nil { 342 return 343 } 344 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Access)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 345 if e1 != 0 { 346 err = errnoErr(e1) 347 } 348 return 349 } 350 351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 352 353 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 354 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Adjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0) 355 if e1 != 0 { 356 err = errnoErr(e1) 357 } 358 return 359 } 360 361 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 362 363 func Chdir(path string) (err error) { 364 var _p0 *byte 365 _p0, err = BytePtrFromString(path) 366 if err != nil { 367 return 368 } 369 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 370 if e1 != 0 { 371 err = errnoErr(e1) 372 } 373 return 374 } 375 376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 377 378 func Chmod(path string, mode uint32) (err error) { 379 var _p0 *byte 380 _p0, err = BytePtrFromString(path) 381 if err != nil { 382 return 383 } 384 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 385 if e1 != 0 { 386 err = errnoErr(e1) 387 } 388 return 389 } 390 391 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 392 393 func Chown(path string, uid int, gid int) (err error) { 394 var _p0 *byte 395 _p0, err = BytePtrFromString(path) 396 if err != nil { 397 return 398 } 399 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 400 if e1 != 0 { 401 err = errnoErr(e1) 402 } 403 return 404 } 405 406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 407 408 func Chroot(path string) (err error) { 409 var _p0 *byte 410 _p0, err = BytePtrFromString(path) 411 if err != nil { 412 return 413 } 414 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 415 if e1 != 0 { 416 err = errnoErr(e1) 417 } 418 return 419 } 420 421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 422 423 func Close(fd int) (err error) { 424 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Close)), 1, uintptr(fd), 0, 0, 0, 0, 0) 425 if e1 != 0 { 426 err = errnoErr(e1) 427 } 428 return 429 } 430 431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 432 433 func Dup(fd int) (nfd int, err error) { 434 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Dup)), 1, uintptr(fd), 0, 0, 0, 0, 0) 435 nfd = int(r0) 436 if e1 != 0 { 437 err = errnoErr(e1) 438 } 439 return 440 } 441 442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 443 444 func Fchdir(fd int) (err error) { 445 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0) 446 if e1 != 0 { 447 err = errnoErr(e1) 448 } 449 return 450 } 451 452 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 453 454 func Fchmod(fd int, mode uint32) (err error) { 455 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0) 456 if e1 != 0 { 457 err = errnoErr(e1) 458 } 459 return 460 } 461 462 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 463 464 func Fchown(fd int, uid int, gid int) (err error) { 465 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0) 466 if e1 != 0 { 467 err = errnoErr(e1) 468 } 469 return 470 } 471 472 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 473 474 func Fpathconf(fd int, name int) (val int, err error) { 475 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0) 476 val = int(r0) 477 if e1 != 0 { 478 err = errnoErr(e1) 479 } 480 return 481 } 482 483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 484 485 func Fstat(fd int, stat *Stat_t) (err error) { 486 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 487 if e1 != 0 { 488 err = errnoErr(e1) 489 } 490 return 491 } 492 493 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 494 495 func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) { 496 var _p0 *byte 497 if len(buf) > 0 { 498 _p0 = &buf[0] 499 } 500 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 501 n = int(r0) 502 if e1 != 0 { 503 err = errnoErr(e1) 504 } 505 return 506 } 507 508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 509 510 func Getgid() (gid int) { 511 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getgid)), 0, 0, 0, 0, 0, 0, 0) 512 gid = int(r0) 513 return 514 } 515 516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 517 518 func Getpid() (pid int) { 519 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getpid)), 0, 0, 0, 0, 0, 0, 0) 520 pid = int(r0) 521 return 522 } 523 524 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 525 526 func Geteuid() (euid int) { 527 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Geteuid)), 0, 0, 0, 0, 0, 0, 0) 528 euid = int(r0) 529 return 530 } 531 532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 533 534 func Getegid() (egid int) { 535 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getegid)), 0, 0, 0, 0, 0, 0, 0) 536 egid = int(r0) 537 return 538 } 539 540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 541 542 func Getppid() (ppid int) { 543 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getppid)), 0, 0, 0, 0, 0, 0, 0) 544 ppid = int(r0) 545 return 546 } 547 548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 549 550 func Getpriority(which int, who int) (n int, err error) { 551 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0) 552 n = int(r0) 553 if e1 != 0 { 554 err = errnoErr(e1) 555 } 556 return 557 } 558 559 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 560 561 func Getrlimit(which int, lim *Rlimit) (err error) { 562 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) 563 if e1 != 0 { 564 err = errnoErr(e1) 565 } 566 return 567 } 568 569 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 570 571 func Gettimeofday(tv *Timeval) (err error) { 572 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Gettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0) 573 if e1 != 0 { 574 err = errnoErr(e1) 575 } 576 return 577 } 578 579 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 580 581 func Getuid() (uid int) { 582 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getuid)), 0, 0, 0, 0, 0, 0, 0) 583 uid = int(r0) 584 return 585 } 586 587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 588 589 func Kill(pid int, signum Signal) (err error) { 590 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Kill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0) 591 if e1 != 0 { 592 err = errnoErr(e1) 593 } 594 return 595 } 596 597 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 598 599 func Lchown(path string, uid int, gid int) (err error) { 600 var _p0 *byte 601 _p0, err = BytePtrFromString(path) 602 if err != nil { 603 return 604 } 605 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 606 if e1 != 0 { 607 err = errnoErr(e1) 608 } 609 return 610 } 611 612 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 613 614 func Link(path string, link string) (err error) { 615 var _p0 *byte 616 _p0, err = BytePtrFromString(path) 617 if err != nil { 618 return 619 } 620 var _p1 *byte 621 _p1, err = BytePtrFromString(link) 622 if err != nil { 623 return 624 } 625 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Link)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 626 if e1 != 0 { 627 err = errnoErr(e1) 628 } 629 return 630 } 631 632 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 633 634 func Listen(s int, backlog int) (err error) { 635 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) 636 if e1 != 0 { 637 err = errnoErr(e1) 638 } 639 return 640 } 641 642 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 643 644 func Lstat(path string, stat *Stat_t) (err error) { 645 var _p0 *byte 646 _p0, err = BytePtrFromString(path) 647 if err != nil { 648 return 649 } 650 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 651 if e1 != 0 { 652 err = errnoErr(e1) 653 } 654 return 655 } 656 657 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 658 659 func Mkdir(path string, mode uint32) (err error) { 660 var _p0 *byte 661 _p0, err = BytePtrFromString(path) 662 if err != nil { 663 return 664 } 665 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 666 if e1 != 0 { 667 err = errnoErr(e1) 668 } 669 return 670 } 671 672 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 673 674 func Mknod(path string, mode uint32, dev int) (err error) { 675 var _p0 *byte 676 _p0, err = BytePtrFromString(path) 677 if err != nil { 678 return 679 } 680 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0) 681 if e1 != 0 { 682 err = errnoErr(e1) 683 } 684 return 685 } 686 687 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 688 689 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 690 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Nanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0) 691 if e1 != 0 { 692 err = errnoErr(e1) 693 } 694 return 695 } 696 697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 698 699 func Open(path string, mode int, perm uint32) (fd int, err error) { 700 var _p0 *byte 701 _p0, err = BytePtrFromString(path) 702 if err != nil { 703 return 704 } 705 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Open)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0) 706 fd = int(r0) 707 if e1 != 0 { 708 err = errnoErr(e1) 709 } 710 return 711 } 712 713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 714 715 func Pathconf(path string, name int) (val int, err error) { 716 var _p0 *byte 717 _p0, err = BytePtrFromString(path) 718 if err != nil { 719 return 720 } 721 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0) 722 val = int(r0) 723 if e1 != 0 { 724 err = errnoErr(e1) 725 } 726 return 727 } 728 729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 730 731 func Pread(fd int, p []byte, offset int64) (n int, err error) { 732 var _p0 *byte 733 if len(p) > 0 { 734 _p0 = &p[0] 735 } 736 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) 737 n = int(r0) 738 if e1 != 0 { 739 err = errnoErr(e1) 740 } 741 return 742 } 743 744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 745 746 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 747 var _p0 *byte 748 if len(p) > 0 { 749 _p0 = &p[0] 750 } 751 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) 752 n = int(r0) 753 if e1 != 0 { 754 err = errnoErr(e1) 755 } 756 return 757 } 758 759 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 760 761 func read(fd int, p []byte) (n int, err error) { 762 var _p0 *byte 763 if len(p) > 0 { 764 _p0 = &p[0] 765 } 766 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) 767 n = int(r0) 768 if e1 != 0 { 769 err = errnoErr(e1) 770 } 771 return 772 } 773 774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 775 776 func Readlink(path string, buf []byte) (n int, err error) { 777 var _p0 *byte 778 _p0, err = BytePtrFromString(path) 779 if err != nil { 780 return 781 } 782 var _p1 *byte 783 if len(buf) > 0 { 784 _p1 = &buf[0] 785 } 786 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Readlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0) 787 n = int(r0) 788 if e1 != 0 { 789 err = errnoErr(e1) 790 } 791 return 792 } 793 794 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 795 796 func Rename(from string, to string) (err error) { 797 var _p0 *byte 798 _p0, err = BytePtrFromString(from) 799 if err != nil { 800 return 801 } 802 var _p1 *byte 803 _p1, err = BytePtrFromString(to) 804 if err != nil { 805 return 806 } 807 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 808 if e1 != 0 { 809 err = errnoErr(e1) 810 } 811 return 812 } 813 814 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 815 816 func Rmdir(path string) (err error) { 817 var _p0 *byte 818 _p0, err = BytePtrFromString(path) 819 if err != nil { 820 return 821 } 822 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 823 if e1 != 0 { 824 err = errnoErr(e1) 825 } 826 return 827 } 828 829 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 830 831 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 832 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) 833 newoffset = int64(r0) 834 if e1 != 0 { 835 err = errnoErr(e1) 836 } 837 return 838 } 839 840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 841 842 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 843 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_sendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 844 written = int(r0) 845 if e1 != 0 { 846 err = errnoErr(e1) 847 } 848 return 849 } 850 851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 852 853 func Setegid(egid int) (err error) { 854 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setegid)), 1, uintptr(egid), 0, 0, 0, 0, 0) 855 if e1 != 0 { 856 err = errnoErr(e1) 857 } 858 return 859 } 860 861 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 862 863 func Seteuid(euid int) (err error) { 864 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Seteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0) 865 if e1 != 0 { 866 err = errnoErr(e1) 867 } 868 return 869 } 870 871 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 872 873 func Setgid(gid int) (err error) { 874 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setgid)), 1, uintptr(gid), 0, 0, 0, 0, 0) 875 if e1 != 0 { 876 err = errnoErr(e1) 877 } 878 return 879 } 880 881 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 882 883 func Setpgid(pid int, pgid int) (err error) { 884 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0) 885 if e1 != 0 { 886 err = errnoErr(e1) 887 } 888 return 889 } 890 891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 892 893 func Setpriority(which int, who int, prio int) (err error) { 894 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0) 895 if e1 != 0 { 896 err = errnoErr(e1) 897 } 898 return 899 } 900 901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 902 903 func Setregid(rgid int, egid int) (err error) { 904 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0) 905 if e1 != 0 { 906 err = errnoErr(e1) 907 } 908 return 909 } 910 911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 912 913 func Setreuid(ruid int, euid int) (err error) { 914 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0) 915 if e1 != 0 { 916 err = errnoErr(e1) 917 } 918 return 919 } 920 921 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 922 923 func Setrlimit(which int, lim *Rlimit) (err error) { 924 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) 925 if e1 != 0 { 926 err = errnoErr(e1) 927 } 928 return 929 } 930 931 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 932 933 func Setsid() (pid int, err error) { 934 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setsid)), 0, 0, 0, 0, 0, 0, 0) 935 pid = int(r0) 936 if e1 != 0 { 937 err = errnoErr(e1) 938 } 939 return 940 } 941 942 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 943 944 func Setuid(uid int) (err error) { 945 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) 946 if e1 != 0 { 947 err = errnoErr(e1) 948 } 949 return 950 } 951 952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 953 954 func Shutdown(s int, how int) (err error) { 955 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0) 956 if e1 != 0 { 957 err = errnoErr(e1) 958 } 959 return 960 } 961 962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 963 964 func Stat(path string, stat *Stat_t) (err error) { 965 var _p0 *byte 966 _p0, err = BytePtrFromString(path) 967 if err != nil { 968 return 969 } 970 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Stat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 971 if e1 != 0 { 972 err = errnoErr(e1) 973 } 974 return 975 } 976 977 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 978 979 func Symlink(path string, link string) (err error) { 980 var _p0 *byte 981 _p0, err = BytePtrFromString(path) 982 if err != nil { 983 return 984 } 985 var _p1 *byte 986 _p1, err = BytePtrFromString(link) 987 if err != nil { 988 return 989 } 990 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Symlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 991 if e1 != 0 { 992 err = errnoErr(e1) 993 } 994 return 995 } 996 997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 998 999 func Sync() (err error) { 1000 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Sync)), 0, 0, 0, 0, 0, 0, 0) 1001 if e1 != 0 { 1002 err = errnoErr(e1) 1003 } 1004 return 1005 } 1006 1007 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1008 1009 func Truncate(path string, length int64) (err error) { 1010 var _p0 *byte 1011 _p0, err = BytePtrFromString(path) 1012 if err != nil { 1013 return 1014 } 1015 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Truncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0) 1016 if e1 != 0 { 1017 err = errnoErr(e1) 1018 } 1019 return 1020 } 1021 1022 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1023 1024 func Fsync(fd int) (err error) { 1025 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0) 1026 if e1 != 0 { 1027 err = errnoErr(e1) 1028 } 1029 return 1030 } 1031 1032 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1033 1034 func Ftruncate(fd int, length int64) (err error) { 1035 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) 1036 if e1 != 0 { 1037 err = errnoErr(e1) 1038 } 1039 return 1040 } 1041 1042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1043 1044 func Umask(newmask int) (oldmask int) { 1045 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Umask)), 1, uintptr(newmask), 0, 0, 0, 0, 0) 1046 oldmask = int(r0) 1047 return 1048 } 1049 1050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1051 1052 func Unlink(path string) (err error) { 1053 var _p0 *byte 1054 _p0, err = BytePtrFromString(path) 1055 if err != nil { 1056 return 1057 } 1058 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Unlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 1059 if e1 != 0 { 1060 err = errnoErr(e1) 1061 } 1062 return 1063 } 1064 1065 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1066 1067 func utimes(path string, times *[2]Timeval) (err error) { 1068 var _p0 *byte 1069 _p0, err = BytePtrFromString(path) 1070 if err != nil { 1071 return 1072 } 1073 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_utimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0) 1074 if e1 != 0 { 1075 err = errnoErr(e1) 1076 } 1077 return 1078 } 1079 1080 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1081 1082 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1083 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 1084 if e1 != 0 { 1085 err = errnoErr(e1) 1086 } 1087 return 1088 } 1089 1090 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1091 1092 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1093 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 1094 if e1 != 0 { 1095 err = errnoErr(e1) 1096 } 1097 return 1098 } 1099 1100 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1101 1102 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1103 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_mmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) 1104 ret = uintptr(r0) 1105 if e1 != 0 { 1106 err = errnoErr(e1) 1107 } 1108 return 1109 } 1110 1111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1112 1113 func munmap(addr uintptr, length uintptr) (err error) { 1114 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0) 1115 if e1 != 0 { 1116 err = errnoErr(e1) 1117 } 1118 return 1119 } 1120 1121 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1122 1123 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1124 var _p0 *byte 1125 if len(buf) > 0 { 1126 _p0 = &buf[0] 1127 } 1128 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1129 if e1 != 0 { 1130 err = errnoErr(e1) 1131 } 1132 return 1133 } 1134 1135 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1136 1137 func socket(domain int, typ int, proto int) (fd int, err error) { 1138 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) 1139 fd = int(r0) 1140 if e1 != 0 { 1141 err = errnoErr(e1) 1142 } 1143 return 1144 } 1145 1146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1147 1148 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 1149 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc___xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 1150 if e1 != 0 { 1151 err = errnoErr(e1) 1152 } 1153 return 1154 } 1155 1156 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1157 1158 func write(fd int, p []byte) (n int, err error) { 1159 var _p0 *byte 1160 if len(p) > 0 { 1161 _p0 = &p[0] 1162 } 1163 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) 1164 n = int(r0) 1165 if e1 != 0 { 1166 err = errnoErr(e1) 1167 } 1168 return 1169 } 1170 1171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1172 1173 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1174 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1175 if e1 != 0 { 1176 err = errnoErr(e1) 1177 } 1178 return 1179 } 1180 1181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1182 1183 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1184 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 1185 if e1 != 0 { 1186 err = errnoErr(e1) 1187 } 1188 return 1189 } 1190 1191 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1192 1193 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1194 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 1195 if e1 != 0 { 1196 err = errnoErr(e1) 1197 } 1198 return 1199 } 1200 1201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1202 1203 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1204 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1205 if e1 != 0 { 1206 err = errnoErr(e1) 1207 } 1208 return 1209 } 1210 1211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1212 1213 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1214 var _p0 *byte 1215 if len(p) > 0 { 1216 _p0 = &p[0] 1217 } 1218 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1219 n = int(r0) 1220 if e1 != 0 { 1221 err = errnoErr(e1) 1222 } 1223 return 1224 } 1225 1226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1227 1228 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1229 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) 1230 n = int(r0) 1231 if e1 != 0 { 1232 err = errnoErr(e1) 1233 } 1234 return 1235 } 1236 1237 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1238 1239 func getexecname() (path unsafe.Pointer, err error) { 1240 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getexecname)), 0, 0, 0, 0, 0, 0, 0) 1241 path = unsafe.Pointer(r0) 1242 if e1 != 0 { 1243 err = errnoErr(e1) 1244 } 1245 return 1246 } 1247 1248 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1249 1250 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { 1251 var _p0 *byte 1252 _p0, err = BytePtrFromString(path) 1253 if err != nil { 1254 return 1255 } 1256 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_utimensat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) 1257 if e1 != 0 { 1258 err = errnoErr(e1) 1259 } 1260 return 1261 }