summaryrefslogtreecommitdiff
path: root/src/syscall/syscall.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-07-29 14:44:48 -0700
committerRob Pike <r@golang.org>2008-07-29 14:44:48 -0700
commite4597000ebdedb97d417391403b29006418cdf5f (patch)
tree865108e75245ddaa2f4f73898fb397dc92afcf2f /src/syscall/syscall.go
parent4a08aeb4d93fbb527663cd03c7e89025b70fef0f (diff)
downloadgo-e4597000ebdedb97d417391403b29006418cdf5f.tar.gz
rewrite system call interface to use less assembler.
R=gri OCL=13546 CL=13546
Diffstat (limited to 'src/syscall/syscall.go')
-rw-r--r--src/syscall/syscall.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/syscall/syscall.go b/src/syscall/syscall.go
index a834e2998..927536074 100644
--- a/src/syscall/syscall.go
+++ b/src/syscall/syscall.go
@@ -8,12 +8,13 @@ package syscall
* These calls have signatures that are independent of operating system.
*
* For simplicity of addressing in assembler, all integers are 64 bits
- * in these calling sequences.
+ * in these calling sequences (although it complicates some, such as pipe)
*/
-func open(name *byte, mode int64) (ret int64, errno int64);
-func close(fd int64) (ret int64, errno int64);
-func read(fd int64, buf *byte, nbytes int64) (ret int64, errno int64);
-func write(fd int64, buf *byte, nbytes int64) (ret int64, errno int64);
+func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
+func AddrToInt(b *byte) int64;
+
+export Syscall
+export AddrToInt
+
-export open, close, read, write