...
Run Format

Source file src/syscall/zsyscall_darwin_amd64.go

Documentation: syscall

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

View as plain text