Source file src/syscall/zsyscall_darwin_arm64.go

Documentation: syscall

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

View as plain text