summaryrefslogtreecommitdiff
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
commit89e9ecebce88654474c8c34e0f478687821f1c14 (patch)
treeea13fc64b0665ed56ba3685d5ea857198de93a20 /src/lib/syscall/file_linux.go
parent4b77e99cd49072fd12dadf14050a5c7cf2da3fba (diff)
downloadgolang-89e9ecebce88654474c8c34e0f478687821f1c14.tar.gz
* 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 fdf690fbb..b5120a70b 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
+}
+