blob: 6e63d9a0743fa903d994202d3edad202942db288 [file] [log] [blame]
Rob Pike319a8c42011-03-21 13:02:10 -07001// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
Russ Coxe11f8332009-06-01 22:15:08 -07002// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
3
Shenghou Ma38631842015-05-14 21:01:52 -04004// +build amd64,darwin
5
Russ Coxe11f8332009-06-01 22:15:08 -07006package syscall
7
Russ Coxb04ac102009-08-12 13:19:17 -07008import "unsafe"
Russ Coxe11f8332009-06-01 22:15:08 -07009
Russ Cox5c4917c2010-09-24 15:17:20 -040010// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11
Russ Coxc017a822011-11-13 22:44:52 -050012func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -070013 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080014 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -050015 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080016 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050017 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080018 return
Russ Coxe11f8332009-06-01 22:15:08 -070019}
20
Russ Cox5c4917c2010-09-24 15:17:20 -040021// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
22
Russ Coxc017a822011-11-13 22:44:52 -050023func setgroups(ngid int, gid *_Gid_t) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -070024 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
Russ Coxc017a822011-11-13 22:44:52 -050025 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080026 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050027 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080028 return
Russ Coxe11f8332009-06-01 22:15:08 -070029}
30
Russ Cox5c4917c2010-09-24 15:17:20 -040031// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
32
Russ Coxc017a822011-11-13 22:44:52 -050033func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080034 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
35 wpid = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -050036 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080037 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050038 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080039 return
Russ Coxe11f8332009-06-01 22:15:08 -070040}
41
Russ Cox5c4917c2010-09-24 15:17:20 -040042// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
43
Russ Coxc017a822011-11-13 22:44:52 -050044func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080045 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
46 fd = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -050047 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080048 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050049 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080050 return
Russ Coxe11f8332009-06-01 22:15:08 -070051}
52
Russ Cox5c4917c2010-09-24 15:17:20 -040053// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
54
Brad Fitzpatrickf00af3d2014-01-21 18:54:49 -080055func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080056 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
Russ Coxc017a822011-11-13 22:44:52 -050057 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080058 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050059 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080060 return
Russ Coxe11f8332009-06-01 22:15:08 -070061}
62
Russ Cox5c4917c2010-09-24 15:17:20 -040063// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
64
Brad Fitzpatrickf00af3d2014-01-21 18:54:49 -080065func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080066 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
Russ Coxc017a822011-11-13 22:44:52 -050067 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080068 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050069 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080070 return
Russ Coxe11f8332009-06-01 22:15:08 -070071}
72
Russ Cox5c4917c2010-09-24 15:17:20 -040073// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
74
Russ Coxc017a822011-11-13 22:44:52 -050075func socket(domain int, typ int, proto int) (fd int, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -070076 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080077 fd = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -050078 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080079 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050080 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080081 return
Russ Coxe11f8332009-06-01 22:15:08 -070082}
83
Russ Cox5c4917c2010-09-24 15:17:20 -040084// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
Ivan Krasin400f7a62010-06-30 14:58:21 -070085
Brad Fitzpatrickf00af3d2014-01-21 18:54:49 -080086func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
Albert Strasheime83d6962011-03-25 14:43:59 -040087 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
Russ Coxc017a822011-11-13 22:44:52 -050088 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080089 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -050090 }
Albert Strasheime83d6962011-03-25 14:43:59 -040091 return
92}
93
94// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
95
Brad Fitzpatrickf00af3d2014-01-21 18:54:49 -080096func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -080097 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
Russ Coxc017a822011-11-13 22:44:52 -050098 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -080099 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500100 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800101 return
Russ Coxe11f8332009-06-01 22:15:08 -0700102}
103
Russ Cox5c4917c2010-09-24 15:17:20 -0400104// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
105
Russ Coxc017a822011-11-13 22:44:52 -0500106func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700107 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
Russ Coxc017a822011-11-13 22:44:52 -0500108 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800109 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500110 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800111 return
Russ Cox5d2ee9d2009-06-17 21:44:26 -0700112}
113
Russ Cox5c4917c2010-09-24 15:17:20 -0400114// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
115
Russ Coxc017a822011-11-13 22:44:52 -0500116func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700117 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
Russ Coxc017a822011-11-13 22:44:52 -0500118 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800119 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500120 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800121 return
Russ Cox5d2ee9d2009-06-17 21:44:26 -0700122}
123
Russ Cox5c4917c2010-09-24 15:17:20 -0400124// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
125
Russ Coxc017a822011-11-13 22:44:52 -0500126func Shutdown(s int, how int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800127 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500128 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800129 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500130 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800131 return
Russ Cox0b126c12009-12-01 16:53:43 -0800132}
133
Russ Cox5c4917c2010-09-24 15:17:20 -0400134// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
135
Russ Cox3d5ddff2012-09-24 00:06:22 -0400136func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700137 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -0500138 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800139 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500140 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400141 return
142}
143
144// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
145
Russ Coxc017a822011-11-13 22:44:52 -0500146func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400147 var _p0 unsafe.Pointer
Russ Coxfd1add22009-11-01 11:13:27 -0800148 if len(p) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400149 _p0 = unsafe.Pointer(&p[0])
Russ Cox56faae22011-02-09 14:28:47 -0500150 } else {
151 _p0 = unsafe.Pointer(&_zero)
Russ Coxfd1add22009-11-01 11:13:27 -0800152 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400153 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800154 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500155 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800156 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500157 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800158 return
Russ Coxfd1add22009-11-01 11:13:27 -0800159}
160
Russ Cox5c4917c2010-09-24 15:17:20 -0400161// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
162
Brad Fitzpatrickf00af3d2014-01-21 18:54:49 -0800163func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400164 var _p0 unsafe.Pointer
Russ Coxfd1add22009-11-01 11:13:27 -0800165 if len(buf) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400166 _p0 = unsafe.Pointer(&buf[0])
Russ Cox56faae22011-02-09 14:28:47 -0500167 } else {
168 _p0 = unsafe.Pointer(&_zero)
Russ Coxfd1add22009-11-01 11:13:27 -0800169 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400170 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
Russ Coxc017a822011-11-13 22:44:52 -0500171 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800172 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500173 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800174 return
Russ Coxfd1add22009-11-01 11:13:27 -0800175}
176
Russ Cox5c4917c2010-09-24 15:17:20 -0400177// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
178
Russ Coxc017a822011-11-13 22:44:52 -0500179func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
Mikio Hara5d6f1182011-06-20 18:40:20 -0400180 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
181 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500182 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800183 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500184 }
Mikio Hara5d6f1182011-06-20 18:40:20 -0400185 return
186}
187
188// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
189
Mikio Haraa7858a42014-03-29 09:28:40 +0900190func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
191 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
192 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500193 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800194 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500195 }
Mikio Hara5d6f1182011-06-20 18:40:20 -0400196 return
197}
198
199// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
200
Brad Fitzpatrickba8c92c2014-01-22 10:35:41 -0800201func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800202 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
203 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500204 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800205 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500206 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800207 return
Russ Coxe11f8332009-06-01 22:15:08 -0700208}
209
Russ Cox5c4917c2010-09-24 15:17:20 -0400210// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
211
Russ Coxc017a822011-11-13 22:44:52 -0500212func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400213 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -0700214 if len(mib) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400215 _p0 = unsafe.Pointer(&mib[0])
Russ Cox56faae22011-02-09 14:28:47 -0500216 } else {
217 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -0700218 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400219 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
Russ Coxc017a822011-11-13 22:44:52 -0500220 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800221 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500222 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800223 return
Russ Coxb32769b2009-06-29 13:44:46 -0700224}
225
Russ Cox5c4917c2010-09-24 15:17:20 -0400226// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
227
Russ Coxc017a822011-11-13 22:44:52 -0500228func utimes(path string, timeval *[2]Timeval) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400229 var _p0 *byte
230 _p0, err = BytePtrFromString(path)
231 if err != nil {
232 return
233 }
234 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400235 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500236 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800237 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500238 }
Russ Coxcbc01a32010-05-19 17:47:57 -0700239 return
240}
241
Russ Cox5c4917c2010-09-24 15:17:20 -0400242// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
243
Russ Coxc017a822011-11-13 22:44:52 -0500244func futimes(fd int, timeval *[2]Timeval) (err error) {
Russ Coxcbc01a32010-05-19 17:47:57 -0700245 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500246 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800247 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500248 }
Russ Coxcbc01a32010-05-19 17:47:57 -0700249 return
250}
251
Russ Cox5c4917c2010-09-24 15:17:20 -0400252// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
253
Russ Coxc017a822011-11-13 22:44:52 -0500254func fcntl(fd int, cmd int, arg int) (val int, err error) {
Giles Leanad73de22010-03-26 13:23:54 -0700255 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
256 val = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500257 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800258 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500259 }
Giles Lean729ccb52010-03-24 21:59:21 -0700260 return
261}
262
Russ Cox5c4917c2010-09-24 15:17:20 -0400263// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
264
Russ Coxc017a822011-11-13 22:44:52 -0500265func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
Jeff Hodges0ce57a72011-06-14 12:56:46 -0400266 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -0500267 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800268 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500269 }
Jeff Hodges0ce57a72011-06-14 12:56:46 -0400270 return
271}
272
273// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
274
Russ Coxc017a822011-11-13 22:44:52 -0500275func pipe() (r int, w int, err error) {
Mikio Haradc7f8252011-08-04 00:22:48 -0400276 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
277 r = int(r0)
278 w = int(r1)
Russ Coxc017a822011-11-13 22:44:52 -0500279 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800280 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500281 }
Mikio Haradc7f8252011-08-04 00:22:48 -0400282 return
283}
284
285// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
286
Russ Coxc017a822011-11-13 22:44:52 -0500287func kill(pid int, signum int, posix int) (err error) {
Giles Leanad73de22010-03-26 13:23:54 -0700288 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
Russ Coxc017a822011-11-13 22:44:52 -0500289 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800290 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500291 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800292 return
Russ Coxe11f8332009-06-01 22:15:08 -0700293}
294
Russ Cox5c4917c2010-09-24 15:17:20 -0400295// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
296
Russ Coxc017a822011-11-13 22:44:52 -0500297func Access(path string, mode uint32) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400298 var _p0 *byte
299 _p0, err = BytePtrFromString(path)
300 if err != nil {
301 return
302 }
303 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400304 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500305 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800306 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500307 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800308 return
Russ Coxe11f8332009-06-01 22:15:08 -0700309}
310
Russ Cox5c4917c2010-09-24 15:17:20 -0400311// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
312
Russ Coxc017a822011-11-13 22:44:52 -0500313func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800314 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500315 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800316 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500317 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800318 return
Russ Coxe11f8332009-06-01 22:15:08 -0700319}
320
Russ Cox5c4917c2010-09-24 15:17:20 -0400321// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
322
Russ Coxc017a822011-11-13 22:44:52 -0500323func Chdir(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400324 var _p0 *byte
325 _p0, err = BytePtrFromString(path)
326 if err != nil {
327 return
328 }
329 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400330 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500331 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800332 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500333 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800334 return
Russ Coxe11f8332009-06-01 22:15:08 -0700335}
336
Russ Cox5c4917c2010-09-24 15:17:20 -0400337// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
338
Russ Coxc017a822011-11-13 22:44:52 -0500339func Chflags(path string, flags int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400340 var _p0 *byte
341 _p0, err = BytePtrFromString(path)
342 if err != nil {
343 return
344 }
345 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400346 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500347 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800348 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500349 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800350 return
Russ Coxe11f8332009-06-01 22:15:08 -0700351}
352
Russ Cox5c4917c2010-09-24 15:17:20 -0400353// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
354
Russ Coxc017a822011-11-13 22:44:52 -0500355func Chmod(path string, mode uint32) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400356 var _p0 *byte
357 _p0, err = BytePtrFromString(path)
358 if err != nil {
359 return
360 }
361 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400362 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500363 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800364 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500365 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800366 return
Russ Coxe11f8332009-06-01 22:15:08 -0700367}
368
Russ Cox5c4917c2010-09-24 15:17:20 -0400369// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
370
Russ Coxc017a822011-11-13 22:44:52 -0500371func Chown(path string, uid int, gid int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400372 var _p0 *byte
373 _p0, err = BytePtrFromString(path)
374 if err != nil {
375 return
376 }
377 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
Russ Coxcf622d72014-09-08 16:59:59 -0400378 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500379 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800380 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500381 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800382 return
Russ Coxe11f8332009-06-01 22:15:08 -0700383}
384
Russ Cox5c4917c2010-09-24 15:17:20 -0400385// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
386
Russ Coxc017a822011-11-13 22:44:52 -0500387func Chroot(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400388 var _p0 *byte
389 _p0, err = BytePtrFromString(path)
390 if err != nil {
391 return
392 }
393 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400394 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500395 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800396 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500397 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800398 return
Russ Coxe11f8332009-06-01 22:15:08 -0700399}
400
Russ Cox5c4917c2010-09-24 15:17:20 -0400401// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
402
Russ Coxc017a822011-11-13 22:44:52 -0500403func Close(fd int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800404 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -0500405 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800406 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500407 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800408 return
Russ Coxe11f8332009-06-01 22:15:08 -0700409}
410
Russ Cox5c4917c2010-09-24 15:17:20 -0400411// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
412
Russ Coxc017a822011-11-13 22:44:52 -0500413func Dup(fd int) (nfd int, err error) {
Ian Lance Taylor28074d52015-03-26 08:02:16 -0700414 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800415 nfd = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500416 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800417 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500418 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800419 return
Russ Coxe11f8332009-06-01 22:15:08 -0700420}
421
Russ Cox5c4917c2010-09-24 15:17:20 -0400422// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
423
Russ Coxc017a822011-11-13 22:44:52 -0500424func Dup2(from int, to int) (err error) {
Ian Lance Taylor28074d52015-03-26 08:02:16 -0700425 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500426 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800427 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500428 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800429 return
Russ Coxe11f8332009-06-01 22:15:08 -0700430}
431
Russ Cox5c4917c2010-09-24 15:17:20 -0400432// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
433
Russ Coxc017a822011-11-13 22:44:52 -0500434func Exchangedata(path1 string, path2 string, options int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400435 var _p0 *byte
436 _p0, err = BytePtrFromString(path1)
437 if err != nil {
438 return
439 }
440 var _p1 *byte
441 _p1, err = BytePtrFromString(path2)
442 if err != nil {
443 return
444 }
445 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
Russ Coxcf622d72014-09-08 16:59:59 -0400446 use(unsafe.Pointer(_p0))
447 use(unsafe.Pointer(_p1))
Russ Coxc017a822011-11-13 22:44:52 -0500448 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800449 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500450 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800451 return
Russ Coxe11f8332009-06-01 22:15:08 -0700452}
453
Russ Cox5c4917c2010-09-24 15:17:20 -0400454// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
455
Russ Cox6faacd22009-10-06 19:38:30 -0700456func Exit(code int) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800457 Syscall(SYS_EXIT, uintptr(code), 0, 0)
458 return
Russ Coxe11f8332009-06-01 22:15:08 -0700459}
460
Russ Cox5c4917c2010-09-24 15:17:20 -0400461// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
462
Russ Coxc017a822011-11-13 22:44:52 -0500463func Fchdir(fd int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800464 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -0500465 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800466 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500467 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800468 return
Russ Coxe11f8332009-06-01 22:15:08 -0700469}
470
Russ Cox5c4917c2010-09-24 15:17:20 -0400471// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
472
Shenghou Ma6de184b2013-05-07 05:20:00 +0800473func Fchflags(fd int, flags int) (err error) {
474 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500475 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800476 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500477 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800478 return
Russ Coxe11f8332009-06-01 22:15:08 -0700479}
480
Russ Cox5c4917c2010-09-24 15:17:20 -0400481// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
482
Russ Coxc017a822011-11-13 22:44:52 -0500483func Fchmod(fd int, mode uint32) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800484 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500485 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800486 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500487 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800488 return
Russ Coxe11f8332009-06-01 22:15:08 -0700489}
490
Russ Cox5c4917c2010-09-24 15:17:20 -0400491// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
492
Russ Coxc017a822011-11-13 22:44:52 -0500493func Fchown(fd int, uid int, gid int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800494 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
Russ Coxc017a822011-11-13 22:44:52 -0500495 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800496 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500497 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800498 return
Russ Coxe11f8332009-06-01 22:15:08 -0700499}
500
Russ Cox5c4917c2010-09-24 15:17:20 -0400501// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
Russ Coxc017a822011-11-13 22:44:52 -0500503func Flock(fd int, how int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800504 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500505 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800506 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500507 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800508 return
Russ Coxe11f8332009-06-01 22:15:08 -0700509}
510
Russ Cox5c4917c2010-09-24 15:17:20 -0400511// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
512
Russ Coxc017a822011-11-13 22:44:52 -0500513func Fpathconf(fd int, name int) (val int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800514 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
515 val = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500516 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800517 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500518 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800519 return
Russ Coxe11f8332009-06-01 22:15:08 -0700520}
521
Russ Cox5c4917c2010-09-24 15:17:20 -0400522// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
523
Russ Coxc017a822011-11-13 22:44:52 -0500524func Fstat(fd int, stat *Stat_t) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800525 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500526 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800527 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500528 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800529 return
Russ Coxe11f8332009-06-01 22:15:08 -0700530}
531
Russ Cox5c4917c2010-09-24 15:17:20 -0400532// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
533
Russ Coxc017a822011-11-13 22:44:52 -0500534func Fstatfs(fd int, stat *Statfs_t) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800535 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500536 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800537 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500538 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800539 return
Russ Coxe11f8332009-06-01 22:15:08 -0700540}
541
Russ Cox5c4917c2010-09-24 15:17:20 -0400542// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
543
Russ Coxc017a822011-11-13 22:44:52 -0500544func Fsync(fd int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800545 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -0500546 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800547 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500548 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800549 return
Russ Coxe11f8332009-06-01 22:15:08 -0700550}
551
Russ Cox5c4917c2010-09-24 15:17:20 -0400552// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
553
Russ Coxc017a822011-11-13 22:44:52 -0500554func Ftruncate(fd int, length int64) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800555 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500556 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800557 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500558 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800559 return
Russ Coxe11f8332009-06-01 22:15:08 -0700560}
561
Russ Cox5c4917c2010-09-24 15:17:20 -0400562// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
563
Russ Coxc017a822011-11-13 22:44:52 -0500564func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400565 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -0700566 if len(buf) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400567 _p0 = unsafe.Pointer(&buf[0])
Russ Cox56faae22011-02-09 14:28:47 -0500568 } else {
569 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -0700570 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400571 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800572 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500573 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800574 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500575 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800576 return
Russ Coxe11f8332009-06-01 22:15:08 -0700577}
578
Russ Cox5c4917c2010-09-24 15:17:20 -0400579// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
580
Russ Coxe11f8332009-06-01 22:15:08 -0700581func Getdtablesize() (size int) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800582 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
583 size = int(r0)
584 return
Russ Coxe11f8332009-06-01 22:15:08 -0700585}
586
Russ Cox5c4917c2010-09-24 15:17:20 -0400587// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
Russ Coxe11f8332009-06-01 22:15:08 -0700589func Getegid() (egid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700590 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800591 egid = int(r0)
592 return
Russ Coxe11f8332009-06-01 22:15:08 -0700593}
594
Russ Cox5c4917c2010-09-24 15:17:20 -0400595// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
596
Russ Coxe11f8332009-06-01 22:15:08 -0700597func Geteuid() (uid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700598 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800599 uid = int(r0)
600 return
Russ Coxe11f8332009-06-01 22:15:08 -0700601}
602
Russ Cox5c4917c2010-09-24 15:17:20 -0400603// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
Russ Coxe11f8332009-06-01 22:15:08 -0700605func Getgid() (gid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700606 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800607 gid = int(r0)
608 return
Russ Coxe11f8332009-06-01 22:15:08 -0700609}
610
Russ Cox5c4917c2010-09-24 15:17:20 -0400611// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
612
Russ Coxc017a822011-11-13 22:44:52 -0500613func Getpgid(pid int) (pgid int, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700614 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800615 pgid = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500616 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800617 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500618 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800619 return
Russ Coxe11f8332009-06-01 22:15:08 -0700620}
621
Russ Cox5c4917c2010-09-24 15:17:20 -0400622// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
623
Russ Coxe11f8332009-06-01 22:15:08 -0700624func Getpgrp() (pgrp int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700625 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800626 pgrp = int(r0)
627 return
Russ Coxe11f8332009-06-01 22:15:08 -0700628}
629
Russ Cox5c4917c2010-09-24 15:17:20 -0400630// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
631
Russ Coxe11f8332009-06-01 22:15:08 -0700632func Getpid() (pid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700633 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800634 pid = int(r0)
635 return
Russ Coxe11f8332009-06-01 22:15:08 -0700636}
637
Russ Cox5c4917c2010-09-24 15:17:20 -0400638// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
Russ Coxe11f8332009-06-01 22:15:08 -0700640func Getppid() (ppid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700641 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800642 ppid = int(r0)
643 return
Russ Coxe11f8332009-06-01 22:15:08 -0700644}
645
Russ Cox5c4917c2010-09-24 15:17:20 -0400646// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
Russ Coxc017a822011-11-13 22:44:52 -0500648func Getpriority(which int, who int) (prio int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800649 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
650 prio = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500651 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800652 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500653 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800654 return
Russ Coxe11f8332009-06-01 22:15:08 -0700655}
656
Russ Cox5c4917c2010-09-24 15:17:20 -0400657// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
658
Russ Coxc017a822011-11-13 22:44:52 -0500659func Getrlimit(which int, lim *Rlimit) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700660 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500661 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800662 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500663 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800664 return
Russ Coxe11f8332009-06-01 22:15:08 -0700665}
666
Russ Cox5c4917c2010-09-24 15:17:20 -0400667// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
668
Russ Coxc017a822011-11-13 22:44:52 -0500669func Getrusage(who int, rusage *Rusage) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700670 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500671 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800672 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500673 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800674 return
Russ Coxe11f8332009-06-01 22:15:08 -0700675}
676
Russ Cox5c4917c2010-09-24 15:17:20 -0400677// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
678
Russ Coxc017a822011-11-13 22:44:52 -0500679func Getsid(pid int) (sid int, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700680 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800681 sid = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500682 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800683 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500684 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800685 return
Russ Coxe11f8332009-06-01 22:15:08 -0700686}
687
Russ Cox5c4917c2010-09-24 15:17:20 -0400688// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
Russ Coxe11f8332009-06-01 22:15:08 -0700690func Getuid() (uid int) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700691 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800692 uid = int(r0)
693 return
Russ Coxe11f8332009-06-01 22:15:08 -0700694}
695
Russ Cox5c4917c2010-09-24 15:17:20 -0400696// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
697
Russ Coxe11f8332009-06-01 22:15:08 -0700698func Issetugid() (tainted bool) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -0700699 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800700 tainted = bool(r0 != 0)
701 return
Russ Coxe11f8332009-06-01 22:15:08 -0700702}
703
Russ Cox5c4917c2010-09-24 15:17:20 -0400704// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
Russ Coxc017a822011-11-13 22:44:52 -0500706func Kqueue() (fd int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800707 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
708 fd = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500709 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800710 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500711 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800712 return
Russ Coxe11f8332009-06-01 22:15:08 -0700713}
714
Russ Cox5c4917c2010-09-24 15:17:20 -0400715// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
716
Russ Coxc017a822011-11-13 22:44:52 -0500717func Lchown(path string, uid int, gid int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400718 var _p0 *byte
719 _p0, err = BytePtrFromString(path)
720 if err != nil {
721 return
722 }
723 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
Russ Coxcf622d72014-09-08 16:59:59 -0400724 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500725 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800726 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500727 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800728 return
Russ Coxe11f8332009-06-01 22:15:08 -0700729}
730
Russ Cox5c4917c2010-09-24 15:17:20 -0400731// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
732
Russ Coxc017a822011-11-13 22:44:52 -0500733func Link(path string, link string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400734 var _p0 *byte
735 _p0, err = BytePtrFromString(path)
736 if err != nil {
737 return
738 }
739 var _p1 *byte
740 _p1, err = BytePtrFromString(link)
741 if err != nil {
742 return
743 }
744 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400745 use(unsafe.Pointer(_p0))
746 use(unsafe.Pointer(_p1))
Russ Coxc017a822011-11-13 22:44:52 -0500747 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800748 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500749 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800750 return
Russ Coxe11f8332009-06-01 22:15:08 -0700751}
752
Russ Cox5c4917c2010-09-24 15:17:20 -0400753// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
754
Russ Coxc017a822011-11-13 22:44:52 -0500755func Listen(s int, backlog int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800756 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
Russ Coxc017a822011-11-13 22:44:52 -0500757 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800758 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500759 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800760 return
Russ Coxe11f8332009-06-01 22:15:08 -0700761}
762
Russ Cox5c4917c2010-09-24 15:17:20 -0400763// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
764
Russ Coxc017a822011-11-13 22:44:52 -0500765func Lstat(path string, stat *Stat_t) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400766 var _p0 *byte
767 _p0, err = BytePtrFromString(path)
768 if err != nil {
769 return
770 }
771 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400772 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500773 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800774 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500775 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800776 return
Russ Coxe11f8332009-06-01 22:15:08 -0700777}
778
Russ Cox5c4917c2010-09-24 15:17:20 -0400779// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
780
Russ Coxc017a822011-11-13 22:44:52 -0500781func Mkdir(path string, mode uint32) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400782 var _p0 *byte
783 _p0, err = BytePtrFromString(path)
784 if err != nil {
785 return
786 }
787 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400788 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500789 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800790 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500791 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800792 return
Russ Coxe11f8332009-06-01 22:15:08 -0700793}
794
Russ Cox5c4917c2010-09-24 15:17:20 -0400795// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
796
Russ Coxc017a822011-11-13 22:44:52 -0500797func Mkfifo(path string, mode uint32) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400798 var _p0 *byte
799 _p0, err = BytePtrFromString(path)
800 if err != nil {
801 return
802 }
803 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400804 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500805 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800806 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500807 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800808 return
Russ Coxe11f8332009-06-01 22:15:08 -0700809}
810
Russ Cox5c4917c2010-09-24 15:17:20 -0400811// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
Russ Coxc017a822011-11-13 22:44:52 -0500813func Mknod(path string, mode uint32, dev int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400814 var _p0 *byte
815 _p0, err = BytePtrFromString(path)
816 if err != nil {
817 return
818 }
819 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
Russ Coxcf622d72014-09-08 16:59:59 -0400820 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -0500821 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800822 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500823 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800824 return
Russ Coxe11f8332009-06-01 22:15:08 -0700825}
826
Russ Cox5c4917c2010-09-24 15:17:20 -0400827// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
828
William Orr08706f12014-02-27 10:13:41 -0800829func Mlock(b []byte) (err error) {
830 var _p0 unsafe.Pointer
831 if len(b) > 0 {
832 _p0 = unsafe.Pointer(&b[0])
833 } else {
834 _p0 = unsafe.Pointer(&_zero)
835 }
836 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
837 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800838 err = errnoErr(e1)
William Orr08706f12014-02-27 10:13:41 -0800839 }
840 return
841}
842
843// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
844
845func Mlockall(flags int) (err error) {
846 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
847 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800848 err = errnoErr(e1)
William Orr08706f12014-02-27 10:13:41 -0800849 }
850 return
851}
852
853// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
854
855func Mprotect(b []byte, prot int) (err error) {
856 var _p0 unsafe.Pointer
857 if len(b) > 0 {
858 _p0 = unsafe.Pointer(&b[0])
859 } else {
860 _p0 = unsafe.Pointer(&_zero)
861 }
862 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
863 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800864 err = errnoErr(e1)
William Orr08706f12014-02-27 10:13:41 -0800865 }
866 return
867}
868
869// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
870
871func Munlock(b []byte) (err error) {
872 var _p0 unsafe.Pointer
873 if len(b) > 0 {
874 _p0 = unsafe.Pointer(&b[0])
875 } else {
876 _p0 = unsafe.Pointer(&_zero)
877 }
878 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
879 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800880 err = errnoErr(e1)
William Orr08706f12014-02-27 10:13:41 -0800881 }
882 return
883}
884
885// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
886
887func Munlockall() (err error) {
888 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
889 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800890 err = errnoErr(e1)
William Orr08706f12014-02-27 10:13:41 -0800891 }
892 return
893}
894
895// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
896
Russ Coxc017a822011-11-13 22:44:52 -0500897func Open(path string, mode int, perm uint32) (fd int, err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400898 var _p0 *byte
899 _p0, err = BytePtrFromString(path)
900 if err != nil {
901 return
902 }
903 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
Russ Coxcf622d72014-09-08 16:59:59 -0400904 use(unsafe.Pointer(_p0))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800905 fd = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500906 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800907 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500908 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800909 return
Russ Coxe11f8332009-06-01 22:15:08 -0700910}
911
Russ Cox5c4917c2010-09-24 15:17:20 -0400912// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
Russ Coxc017a822011-11-13 22:44:52 -0500914func Pathconf(path string, name int) (val int, err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400915 var _p0 *byte
916 _p0, err = BytePtrFromString(path)
917 if err != nil {
918 return
919 }
920 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
Russ Coxcf622d72014-09-08 16:59:59 -0400921 use(unsafe.Pointer(_p0))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800922 val = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500923 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800924 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500925 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800926 return
Russ Coxe11f8332009-06-01 22:15:08 -0700927}
928
Russ Cox5c4917c2010-09-24 15:17:20 -0400929// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
930
Russ Coxc017a822011-11-13 22:44:52 -0500931func Pread(fd int, p []byte, offset int64) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400932 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -0700933 if len(p) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400934 _p0 = unsafe.Pointer(&p[0])
Russ Cox56faae22011-02-09 14:28:47 -0500935 } else {
936 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -0700937 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400938 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800939 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500940 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800941 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500942 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800943 return
Russ Coxe11f8332009-06-01 22:15:08 -0700944}
945
Russ Cox5c4917c2010-09-24 15:17:20 -0400946// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
947
Russ Coxc017a822011-11-13 22:44:52 -0500948func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400949 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -0700950 if len(p) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400951 _p0 = unsafe.Pointer(&p[0])
Russ Cox56faae22011-02-09 14:28:47 -0500952 } else {
953 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -0700954 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400955 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800956 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500957 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800958 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500959 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800960 return
Russ Coxe11f8332009-06-01 22:15:08 -0700961}
962
Russ Cox5c4917c2010-09-24 15:17:20 -0400963// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
964
Dmitriy Vyukovcffbfae2012-10-09 20:51:58 +0400965func read(fd int, p []byte) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -0400966 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -0700967 if len(p) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -0400968 _p0 = unsafe.Pointer(&p[0])
Russ Cox56faae22011-02-09 14:28:47 -0500969 } else {
970 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -0700971 }
Russ Cox5c4917c2010-09-24 15:17:20 -0400972 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800973 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500974 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800975 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500976 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800977 return
Russ Coxe11f8332009-06-01 22:15:08 -0700978}
979
Russ Cox5c4917c2010-09-24 15:17:20 -0400980// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
981
Russ Coxc017a822011-11-13 22:44:52 -0500982func Readlink(path string, buf []byte) (n int, err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -0400983 var _p0 *byte
984 _p0, err = BytePtrFromString(path)
985 if err != nil {
986 return
Russ Cox6faacd22009-10-06 19:38:30 -0700987 }
Alexey Borzenkova1083692012-08-05 17:24:32 -0400988 var _p1 unsafe.Pointer
989 if len(buf) > 0 {
990 _p1 = unsafe.Pointer(&buf[0])
991 } else {
992 _p1 = unsafe.Pointer(&_zero)
993 }
994 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
Russ Coxcf622d72014-09-08 16:59:59 -0400995 use(unsafe.Pointer(_p0))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -0800996 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -0500997 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -0800998 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -0500999 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001000 return
Russ Coxe11f8332009-06-01 22:15:08 -07001001}
1002
Russ Cox5c4917c2010-09-24 15:17:20 -04001003// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
Russ Coxc017a822011-11-13 22:44:52 -05001005func Rename(from string, to string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001006 var _p0 *byte
1007 _p0, err = BytePtrFromString(from)
1008 if err != nil {
1009 return
1010 }
1011 var _p1 *byte
1012 _p1, err = BytePtrFromString(to)
1013 if err != nil {
1014 return
1015 }
1016 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001017 use(unsafe.Pointer(_p0))
1018 use(unsafe.Pointer(_p1))
Russ Coxc017a822011-11-13 22:44:52 -05001019 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001020 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001021 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001022 return
Russ Coxe11f8332009-06-01 22:15:08 -07001023}
1024
Russ Cox5c4917c2010-09-24 15:17:20 -04001025// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1026
Russ Coxc017a822011-11-13 22:44:52 -05001027func Revoke(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001028 var _p0 *byte
1029 _p0, err = BytePtrFromString(path)
1030 if err != nil {
1031 return
1032 }
1033 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001034 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001035 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001036 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001037 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001038 return
Russ Coxe11f8332009-06-01 22:15:08 -07001039}
1040
Russ Cox5c4917c2010-09-24 15:17:20 -04001041// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1042
Russ Coxc017a822011-11-13 22:44:52 -05001043func Rmdir(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001044 var _p0 *byte
1045 _p0, err = BytePtrFromString(path)
1046 if err != nil {
1047 return
1048 }
1049 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001050 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001051 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001052 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001053 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001054 return
Russ Coxe11f8332009-06-01 22:15:08 -07001055}
1056
Russ Cox5c4917c2010-09-24 15:17:20 -04001057// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1058
Russ Coxc017a822011-11-13 22:44:52 -05001059func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001060 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1061 newoffset = int64(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001062 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001063 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001064 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001065 return
Russ Cox76c87d52009-06-16 17:17:02 -07001066}
1067
Russ Cox5c4917c2010-09-24 15:17:20 -04001068// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
Russ Coxc017a822011-11-13 22:44:52 -05001070func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001071 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001072 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001073 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001074 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001075 return
Russ Coxe11f8332009-06-01 22:15:08 -07001076}
1077
Russ Cox5c4917c2010-09-24 15:17:20 -04001078// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1079
Russ Coxc017a822011-11-13 22:44:52 -05001080func Setegid(egid int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001081 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001082 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001083 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001084 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001085 return
Russ Coxe11f8332009-06-01 22:15:08 -07001086}
1087
Russ Cox5c4917c2010-09-24 15:17:20 -04001088// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1089
Russ Coxc017a822011-11-13 22:44:52 -05001090func Seteuid(euid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001091 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001092 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001093 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001094 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001095 return
Russ Coxe11f8332009-06-01 22:15:08 -07001096}
1097
Russ Cox5c4917c2010-09-24 15:17:20 -04001098// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
Russ Coxc017a822011-11-13 22:44:52 -05001100func Setgid(gid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001101 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001102 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001103 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001104 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001105 return
Russ Coxe11f8332009-06-01 22:15:08 -07001106}
1107
Russ Cox5c4917c2010-09-24 15:17:20 -04001108// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1109
Russ Coxc017a822011-11-13 22:44:52 -05001110func Setlogin(name string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001111 var _p0 *byte
1112 _p0, err = BytePtrFromString(name)
1113 if err != nil {
1114 return
1115 }
1116 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001117 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001118 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001119 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001120 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001121 return
Russ Coxe11f8332009-06-01 22:15:08 -07001122}
1123
Russ Cox5c4917c2010-09-24 15:17:20 -04001124// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1125
Russ Coxc017a822011-11-13 22:44:52 -05001126func Setpgid(pid int, pgid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001127 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001128 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001129 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001130 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001131 return
Russ Coxe11f8332009-06-01 22:15:08 -07001132}
1133
Russ Cox5c4917c2010-09-24 15:17:20 -04001134// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1135
Russ Coxc017a822011-11-13 22:44:52 -05001136func Setpriority(which int, who int, prio int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001137 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
Russ Coxc017a822011-11-13 22:44:52 -05001138 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001139 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001140 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001141 return
Russ Coxe11f8332009-06-01 22:15:08 -07001142}
1143
Russ Cox5c4917c2010-09-24 15:17:20 -04001144// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1145
Russ Coxc017a822011-11-13 22:44:52 -05001146func Setprivexec(flag int) (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001147 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001148 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001149 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001150 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001151 return
Russ Coxe11f8332009-06-01 22:15:08 -07001152}
1153
Russ Cox5c4917c2010-09-24 15:17:20 -04001154// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1155
Russ Coxc017a822011-11-13 22:44:52 -05001156func Setregid(rgid int, egid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001157 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001158 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001159 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001160 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001161 return
Russ Coxe11f8332009-06-01 22:15:08 -07001162}
1163
Russ Cox5c4917c2010-09-24 15:17:20 -04001164// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1165
Russ Coxc017a822011-11-13 22:44:52 -05001166func Setreuid(ruid int, euid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001167 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001168 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001169 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001170 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001171 return
Russ Coxe11f8332009-06-01 22:15:08 -07001172}
1173
Russ Cox5c4917c2010-09-24 15:17:20 -04001174// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1175
Russ Coxc017a822011-11-13 22:44:52 -05001176func Setrlimit(which int, lim *Rlimit) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001177 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001178 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001179 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001180 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001181 return
Russ Coxe11f8332009-06-01 22:15:08 -07001182}
1183
Russ Cox5c4917c2010-09-24 15:17:20 -04001184// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1185
Russ Coxc017a822011-11-13 22:44:52 -05001186func Setsid() (pid int, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001187 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001188 pid = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001189 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001190 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001191 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001192 return
Russ Coxe11f8332009-06-01 22:15:08 -07001193}
1194
Russ Cox5c4917c2010-09-24 15:17:20 -04001195// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1196
Russ Coxc017a822011-11-13 22:44:52 -05001197func Settimeofday(tp *Timeval) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001198 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001199 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001200 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001201 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001202 return
Russ Coxe11f8332009-06-01 22:15:08 -07001203}
1204
Russ Cox5c4917c2010-09-24 15:17:20 -04001205// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1206
Russ Coxc017a822011-11-13 22:44:52 -05001207func Setuid(uid int) (err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001208 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001209 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001210 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001211 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001212 return
Russ Coxe11f8332009-06-01 22:15:08 -07001213}
1214
Russ Cox5c4917c2010-09-24 15:17:20 -04001215// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1216
Russ Coxc017a822011-11-13 22:44:52 -05001217func Stat(path string, stat *Stat_t) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001218 var _p0 *byte
1219 _p0, err = BytePtrFromString(path)
1220 if err != nil {
1221 return
1222 }
1223 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001224 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001225 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001226 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001227 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001228 return
Russ Coxe11f8332009-06-01 22:15:08 -07001229}
1230
Russ Cox5c4917c2010-09-24 15:17:20 -04001231// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1232
Russ Coxc017a822011-11-13 22:44:52 -05001233func Statfs(path string, stat *Statfs_t) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001234 var _p0 *byte
1235 _p0, err = BytePtrFromString(path)
1236 if err != nil {
1237 return
1238 }
1239 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001240 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001241 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001242 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001243 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001244 return
Russ Coxe11f8332009-06-01 22:15:08 -07001245}
1246
Russ Cox5c4917c2010-09-24 15:17:20 -04001247// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1248
Russ Coxc017a822011-11-13 22:44:52 -05001249func Symlink(path string, link string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001250 var _p0 *byte
1251 _p0, err = BytePtrFromString(path)
1252 if err != nil {
1253 return
1254 }
1255 var _p1 *byte
1256 _p1, err = BytePtrFromString(link)
1257 if err != nil {
1258 return
1259 }
1260 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001261 use(unsafe.Pointer(_p0))
1262 use(unsafe.Pointer(_p1))
Russ Coxc017a822011-11-13 22:44:52 -05001263 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001264 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001265 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001266 return
Russ Coxe11f8332009-06-01 22:15:08 -07001267}
1268
Russ Cox5c4917c2010-09-24 15:17:20 -04001269// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1270
Russ Coxc017a822011-11-13 22:44:52 -05001271func Sync() (err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001272 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
Russ Coxc017a822011-11-13 22:44:52 -05001273 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001274 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001275 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001276 return
Russ Coxe11f8332009-06-01 22:15:08 -07001277}
1278
Russ Cox5c4917c2010-09-24 15:17:20 -04001279// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1280
Russ Coxc017a822011-11-13 22:44:52 -05001281func Truncate(path string, length int64) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001282 var _p0 *byte
1283 _p0, err = BytePtrFromString(path)
1284 if err != nil {
1285 return
1286 }
1287 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001288 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001289 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001290 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001291 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001292 return
Russ Coxe11f8332009-06-01 22:15:08 -07001293}
1294
Russ Cox5c4917c2010-09-24 15:17:20 -04001295// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1296
Giles Lean5aa3a8d2010-02-16 11:43:25 -08001297func Umask(newmask int) (oldmask int) {
1298 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1299 oldmask = int(r0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001300 return
Russ Coxe11f8332009-06-01 22:15:08 -07001301}
1302
Russ Cox5c4917c2010-09-24 15:17:20 -04001303// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1304
Russ Coxc017a822011-11-13 22:44:52 -05001305func Undelete(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001306 var _p0 *byte
1307 _p0, err = BytePtrFromString(path)
1308 if err != nil {
1309 return
1310 }
1311 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001312 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001313 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001314 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001315 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001316 return
Russ Coxe11f8332009-06-01 22:15:08 -07001317}
1318
Russ Cox5c4917c2010-09-24 15:17:20 -04001319// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1320
Russ Coxc017a822011-11-13 22:44:52 -05001321func Unlink(path string) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001322 var _p0 *byte
1323 _p0, err = BytePtrFromString(path)
1324 if err != nil {
1325 return
1326 }
1327 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001328 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001329 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001330 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001331 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001332 return
Russ Coxe11f8332009-06-01 22:15:08 -07001333}
1334
Russ Cox5c4917c2010-09-24 15:17:20 -04001335// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1336
Russ Coxc017a822011-11-13 22:44:52 -05001337func Unmount(path string, flags int) (err error) {
Alexey Borzenkova1083692012-08-05 17:24:32 -04001338 var _p0 *byte
1339 _p0, err = BytePtrFromString(path)
1340 if err != nil {
1341 return
1342 }
1343 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
Russ Coxcf622d72014-09-08 16:59:59 -04001344 use(unsafe.Pointer(_p0))
Russ Coxc017a822011-11-13 22:44:52 -05001345 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001346 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001347 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001348 return
Russ Coxe11f8332009-06-01 22:15:08 -07001349}
1350
Russ Cox5c4917c2010-09-24 15:17:20 -04001351// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1352
Dmitriy Vyukovcffbfae2012-10-09 20:51:58 +04001353func write(fd int, p []byte) (n int, err error) {
Russ Cox5c4917c2010-09-24 15:17:20 -04001354 var _p0 unsafe.Pointer
Russ Cox6faacd22009-10-06 19:38:30 -07001355 if len(p) > 0 {
Russ Cox5c4917c2010-09-24 15:17:20 -04001356 _p0 = unsafe.Pointer(&p[0])
Russ Cox56faae22011-02-09 14:28:47 -05001357 } else {
1358 _p0 = unsafe.Pointer(&_zero)
Russ Cox6faacd22009-10-06 19:38:30 -07001359 }
Russ Cox5c4917c2010-09-24 15:17:20 -04001360 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001361 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001362 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001363 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001364 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001365 return
Russ Coxe11f8332009-06-01 22:15:08 -07001366}
1367
Russ Cox5c4917c2010-09-24 15:17:20 -04001368// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1369
Russ Coxc017a822011-11-13 22:44:52 -05001370func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
Joel Sing68fea342011-08-08 09:56:45 -04001371 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1372 ret = uintptr(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001373 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001374 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001375 }
Joel Sing68fea342011-08-08 09:56:45 -04001376 return
1377}
1378
1379// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1380
Russ Coxc017a822011-11-13 22:44:52 -05001381func munmap(addr uintptr, length uintptr) (err error) {
Joel Sing68fea342011-08-08 09:56:45 -04001382 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
Russ Coxc017a822011-11-13 22:44:52 -05001383 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001384 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001385 }
Joel Sing68fea342011-08-08 09:56:45 -04001386 return
1387}
1388
1389// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1390
Dmitriy Vyukovcffbfae2012-10-09 20:51:58 +04001391func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001392 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1393 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001394 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001395 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001396 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001397 return
Russ Coxe11f8332009-06-01 22:15:08 -07001398}
1399
Russ Cox5c4917c2010-09-24 15:17:20 -04001400// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1401
Dmitriy Vyukovcffbfae2012-10-09 20:51:58 +04001402func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001403 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1404 n = int(r0)
Russ Coxc017a822011-11-13 22:44:52 -05001405 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001406 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001407 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001408 return
Russ Coxe11f8332009-06-01 22:15:08 -07001409}
1410
Russ Cox5c4917c2010-09-24 15:17:20 -04001411// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1412
Russ Coxc017a822011-11-13 22:44:52 -05001413func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
Ian Lance Taylor4fd41e42011-03-16 19:03:01 -07001414 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001415 sec = int64(r0)
1416 usec = int32(r1)
Russ Coxc017a822011-11-13 22:44:52 -05001417 if e1 != 0 {
Brad Fitzpatrick6bf00072015-03-03 16:42:06 -08001418 err = errnoErr(e1)
Russ Coxc017a822011-11-13 22:44:52 -05001419 }
Robert Griesemerd65a5cc2009-12-15 15:40:16 -08001420 return
Russ Cox01b695d2009-06-08 22:10:48 -07001421}