aboutsummaryrefslogtreecommitdiff
path: root/src/lib/syscall/file_linux.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-09-29 13:37:00 -0700
committerRuss Cox <rsc@golang.org>2008-09-29 13:37:00 -0700
commite4a61c6524bd6877c962db4dd89b3df8cea711b3 (patch)
treeea13fc64b0665ed56ba3685d5ea857198de93a20 /src/lib/syscall/file_linux.go
parent878fe69bc1f22089f5b5aef8a57bd4b3ac1e4790 (diff)
downloadgo-e4a61c6524bd6877c962db4dd89b3df8cea711b3.tar.xz
* implement Linux epoll for polling i/o
* isolate OS-specific polling goop in Pollster type * move generic poll loop out of fd_darwin.go into fd.go R=r DELTA=782 (448 added, 281 deleted, 53 changed) OCL=16108 CL=16119
Diffstat (limited to 'src/lib/syscall/file_linux.go')
-rw-r--r--src/lib/syscall/file_linux.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/syscall/file_linux.go b/src/lib/syscall/file_linux.go
index fdf690fbb2..b5120a70b7 100644
--- a/src/lib/syscall/file_linux.go
+++ b/src/lib/syscall/file_linux.go
@@ -78,7 +78,12 @@ export func unlink(name string) (ret int64, errno int64) {
if !StringToBytes(&namebuf, name) {
return -1, ENAMETOOLONG
}
- const SYSUNLINK = 87;
r1, r2, err := Syscall(SYS_UNLINK, BytePtr(&namebuf[0]), 0, 0);
return r1, err;
}
+
+export func fcntl(fd, cmd, arg int64) (ret int64, errno int64) {
+ r1, r2, err := Syscall(SYS_FCNTL, fd, cmd, arg)
+ return r1, err
+}
+