Commit cffbfaeb authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

race: syscall changes

This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
The purpose of this patch is to provide coarse-grained synchronization
between all Read() and Write() calls.

R=rsc, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/6610064
parent f76f1203
...@@ -203,7 +203,7 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) ...@@ -203,7 +203,7 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
// Read child error status from pipe. // Read child error status from pipe.
Close(p[1]) Close(p[1])
n, err = read(p[0], (*byte)(unsafe.Pointer(&err1)), int(unsafe.Sizeof(err1))) n, err = readlen(p[0], (*byte)(unsafe.Pointer(&err1)), int(unsafe.Sizeof(err1)))
Close(p[0]) Close(p[0])
if err != nil || n != 0 { if err != nil || n != 0 {
if n == int(unsafe.Sizeof(err1)) { if n == int(unsafe.Sizeof(err1)) {
......
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build race
package syscall
import (
"runtime"
"unsafe"
)
const raceenabled = true
func raceAcquire(addr unsafe.Pointer) {
runtime.RaceAcquire(addr)
}
func raceReleaseMerge(addr unsafe.Pointer) {
runtime.RaceReleaseMerge(addr)
}
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !race
package syscall
import (
"unsafe"
)
const raceenabled = false
func raceAcquire(addr unsafe.Pointer) {
}
func raceReleaseMerge(addr unsafe.Pointer) {
}
...@@ -162,7 +162,7 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1) ...@@ -162,7 +162,7 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys Read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
...@@ -191,11 +191,11 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1) ...@@ -191,11 +191,11 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1)
//sys Undelete(path string) (err error) //sys Undelete(path string) (err error)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys Write(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys read(fd int, buf *byte, nbuf int) (n int, err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys write(fd int, buf *byte, nbuf int) (n int, err error) //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
/* /*
* Unimplemented * Unimplemented
......
...@@ -158,7 +158,7 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { ...@@ -158,7 +158,7 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys Read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
...@@ -186,11 +186,11 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { ...@@ -186,11 +186,11 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
//sys Undelete(path string) (err error) //sys Undelete(path string) (err error)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys Write(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys read(fd int, buf *byte, nbuf int) (n int, err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys write(fd int, buf *byte, nbuf int) (n int, err error) //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
/* /*
* Unimplemented * Unimplemented
......
...@@ -864,7 +864,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri ...@@ -864,7 +864,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
//sys Pause() (err error) //sys Pause() (err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64 //sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
//sys Read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(oldpath string, newpath string) (err error) //sys Rename(oldpath string, newpath string) (err error)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
...@@ -889,10 +889,10 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri ...@@ -889,10 +889,10 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
//sys Unshare(flags int) (err error) //sys Unshare(flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys Utime(path string, buf *Utimbuf) (err error) //sys Utime(path string, buf *Utimbuf) (err error)
//sys Write(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error)
//sys exitThread(code int) (err error) = SYS_EXIT //sys exitThread(code int) (err error) = SYS_EXIT
//sys read(fd int, p *byte, np int) (n int, err error) //sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
//sys write(fd int, p *byte, np int) (n int, err error) //sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
// mmap varies by architecture; see syscall_linux_*.go. // mmap varies by architecture; see syscall_linux_*.go.
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
......
...@@ -188,7 +188,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e ...@@ -188,7 +188,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys Read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
...@@ -213,11 +213,11 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e ...@@ -213,11 +213,11 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Umask(newmask int) (oldmask int) //sys Umask(newmask int) (oldmask int)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys Write(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys read(fd int, buf *byte, nbuf int) (n int, err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys write(fd int, buf *byte, nbuf int) (n int, err error) //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
/* /*
* Unimplemented * Unimplemented
......
...@@ -149,7 +149,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e ...@@ -149,7 +149,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys Read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
...@@ -176,11 +176,11 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e ...@@ -176,11 +176,11 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Umask(newmask int) (oldmask int) //sys Umask(newmask int) (oldmask int)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys Write(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys read(fd int, buf *byte, nbuf int) (n int, err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys write(fd int, buf *byte, nbuf int) (n int, err error) //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
/* /*
* Unimplemented * Unimplemented
......
...@@ -115,13 +115,22 @@ func Getppid() (ppid int) { ...@@ -115,13 +115,22 @@ func Getppid() (ppid int) {
} }
func Read(fd int, p []byte) (n int, err error) { func Read(fd int, p []byte) (n int, err error) {
return Pread(fd, p, -1) n, err = Pread(fd, p, -1)
if raceenabled && err == nil {
raceAcquire(unsafe.Pointer(&ioSync))
}
return
} }
func Write(fd int, p []byte) (n int, err error) { func Write(fd int, p []byte) (n int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
}
return Pwrite(fd, p, -1) return Pwrite(fd, p, -1)
} }
var ioSync int64
func Getwd() (wd string, err error) { func Getwd() (wd string, err error) {
fd, e := Open(".", O_RDONLY) fd, e := Open(".", O_RDONLY)
......
...@@ -127,3 +127,20 @@ func (s Signal) String() string { ...@@ -127,3 +127,20 @@ func (s Signal) String() string {
} }
return "signal " + itoa(int(s)) return "signal " + itoa(int(s))
} }
func Read(fd int, p []byte) (n int, err error) {
n, err = read(fd, p)
if raceenabled && err == nil {
raceAcquire(unsafe.Pointer(&ioSync))
}
return
}
func Write(fd int, p []byte) (n int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
}
return write(fd, p)
}
var ioSync int64
...@@ -267,10 +267,16 @@ func Read(fd Handle, p []byte) (n int, err error) { ...@@ -267,10 +267,16 @@ func Read(fd Handle, p []byte) (n int, err error) {
} }
return 0, e return 0, e
} }
if raceenabled {
raceAcquire(unsafe.Pointer(&ioSync))
}
return int(done), nil return int(done), nil
} }
func Write(fd Handle, p []byte) (n int, err error) { func Write(fd Handle, p []byte) (n int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
}
var done uint32 var done uint32
e := WriteFile(fd, p, &done, nil) e := WriteFile(fd, p, &done, nil)
if e != nil { if e != nil {
...@@ -279,6 +285,8 @@ func Write(fd Handle, p []byte) (n int, err error) { ...@@ -279,6 +285,8 @@ func Write(fd Handle, p []byte) (n int, err error) {
return int(done), nil return int(done), nil
} }
var ioSync int64
func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) { func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
var w uint32 var w uint32
switch whence { switch whence {
......
...@@ -895,7 +895,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -895,7 +895,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1269,7 +1269,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1269,7 +1269,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1307,7 +1307,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1307,7 +1307,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1318,7 +1318,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1318,7 +1318,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -895,7 +895,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -895,7 +895,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1269,7 +1269,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1269,7 +1269,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1307,7 +1307,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1307,7 +1307,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1318,7 +1318,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1318,7 +1318,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -885,7 +885,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -885,7 +885,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1249,7 +1249,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1249,7 +1249,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1287,7 +1287,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1287,7 +1287,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1298,7 +1298,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1298,7 +1298,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -885,7 +885,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -885,7 +885,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1249,7 +1249,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1249,7 +1249,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1287,7 +1287,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1287,7 +1287,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1298,7 +1298,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1298,7 +1298,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { ...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) { ...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) { ...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p *byte, np int) (n int, err error) { func readlen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) { ...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p *byte, np int) (n int, err error) { func writelen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { ...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) { ...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) { ...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p *byte, np int) (n int, err error) { func readlen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) { ...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p *byte, np int) (n int, err error) { func writelen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { ...@@ -733,7 +733,7 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) { ...@@ -1067,7 +1067,7 @@ func Utime(path string, buf *Utimbuf) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) { ...@@ -1094,7 +1094,7 @@ func exitThread(code int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p *byte, np int) (n int, err error) { func readlen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) { ...@@ -1105,7 +1105,7 @@ func read(fd int, p *byte, np int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p *byte, np int) (n int, err error) { func writelen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -850,7 +850,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -850,7 +850,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1169,7 +1169,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1169,7 +1169,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1207,7 +1207,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1207,7 +1207,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1218,7 +1218,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1218,7 +1218,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -850,7 +850,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -850,7 +850,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1169,7 +1169,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1169,7 +1169,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1207,7 +1207,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1207,7 +1207,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1218,7 +1218,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1218,7 +1218,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -875,7 +875,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -875,7 +875,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1224,7 +1224,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1224,7 +1224,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1262,7 +1262,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1262,7 +1262,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1273,7 +1273,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1273,7 +1273,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
...@@ -875,7 +875,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ...@@ -875,7 +875,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Read(fd int, p []byte) (n int, err error) { func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1224,7 +1224,7 @@ func Unmount(path string, flags int) (err error) { ...@@ -1224,7 +1224,7 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Write(fd int, p []byte) (n int, err error) { func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
...@@ -1262,7 +1262,7 @@ func munmap(addr uintptr, length uintptr) (err error) { ...@@ -1262,7 +1262,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, buf *byte, nbuf int) (n int, err error) { func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
...@@ -1273,7 +1273,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) { ...@@ -1273,7 +1273,7 @@ func read(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, buf *byte, nbuf int) (n int, err error) { func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0) n = int(r0)
if e1 != 0 { if e1 != 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment