summaryrefslogtreecommitdiff
path: root/libgo/go/syscall/syscall_unix.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-10-23 04:31:11 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-10-23 04:31:11 +0000
commit4ccad563d2a3559f0557bfb177bcf45144219bdf (patch)
tree46bb86f514fbf6bad82da48e69a18fb09d878834 /libgo/go/syscall/syscall_unix.go
parent0b7463235f0e23c624d1911c9b15f531108cc5a6 (diff)
downloadgcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.tar.gz
libgo: Update to current sources.
From-SVN: r192704
Diffstat (limited to 'libgo/go/syscall/syscall_unix.go')
-rw-r--r--libgo/go/syscall/syscall_unix.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/libgo/go/syscall/syscall_unix.go b/libgo/go/syscall/syscall_unix.go
index d4bff9efc9c..fb62681a9e1 100644
--- a/libgo/go/syscall/syscall_unix.go
+++ b/libgo/go/syscall/syscall_unix.go
@@ -179,3 +179,20 @@ func Signame(s Signal) string
func (s Signal) String() string {
return Signame(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