summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux_386.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-11-05 10:55:57 -0800
committerRobert Griesemer <gri@golang.org>2009-11-05 10:55:57 -0800
commitc765b6e1210cafa9d77b42e7b0de71d6e2528296 (patch)
treedbad67480afc941e1b57ecf128eb5c0d20f208b5 /src/pkg/syscall/syscall_linux_386.go
parent60e10e44053afa77c0c17376e03716f3b40a116d (diff)
downloadgolang-c765b6e1210cafa9d77b42e7b0de71d6e2528296.tar.gz
gofmt-ify syscall
(replacement for CL 1018053) R=r http://go/go-review/1017047
Diffstat (limited to 'src/pkg/syscall/syscall_linux_386.go')
-rw-r--r--src/pkg/syscall/syscall_linux_386.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/pkg/syscall/syscall_linux_386.go b/src/pkg/syscall/syscall_linux_386.go
index c506d783d..796859c0a 100644
--- a/src/pkg/syscall/syscall_linux_386.go
+++ b/src/pkg/syscall/syscall_linux_386.go
@@ -7,7 +7,7 @@ package syscall
import "unsafe"
func Getpagesize() int {
- return 4096
+ return 4096;
}
func TimespecToNsec(ts Timespec) int64 {
@@ -15,8 +15,8 @@ func TimespecToNsec(ts Timespec) int64 {
}
func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9);
- ts.Nsec = int32(nsec % 1e9);
+ ts.Sec = int32(nsec/1e9);
+ ts.Nsec = int32(nsec%1e9);
return;
}
@@ -27,7 +27,7 @@ func TimevalToNsec(tv Timeval) int64 {
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999; // round up to microsecond
tv.Sec = int32(nsec/1e9);
- tv.Usec = int32(nsec%1e9 / 1e3);
+ tv.Usec = int32(nsec%1e9/1e3);
return;
}
@@ -72,23 +72,23 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
const (
// see linux/net.h
- _SOCKET = 1;
- _BIND = 2;
- _CONNECT = 3;
- _LISTEN = 4;
- _ACCEPT = 5;
- _GETSOCKNAME = 6;
- _GETPEERNAME = 7;
- _SOCKETPAIR = 8;
- _SEND = 9;
- _RECV = 10;
- _SENDTO = 11;
- _RECVFROM = 12;
- _SHUTDOWN = 13;
- _SETSOCKOPT = 14;
- _GETSOCKOPT = 15;
- _SENDMSG = 16;
- _RECVMSG = 17;
+ _SOCKET = 1;
+ _BIND = 2;
+ _CONNECT = 3;
+ _LISTEN = 4;
+ _ACCEPT = 5;
+ _GETSOCKNAME = 6;
+ _GETPEERNAME = 7;
+ _SOCKETPAIR = 8;
+ _SEND = 9;
+ _RECV = 10;
+ _SENDTO = 11;
+ _RECVFROM = 12;
+ _SHUTDOWN = 13;
+ _SETSOCKOPT = 14;
+ _GETSOCKOPT = 15;
+ _SENDMSG = 16;
+ _RECVMSG = 17;
)
func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int)
@@ -144,7 +144,7 @@ func sendto(s int, p []byte, flags int, to uintptr, addrlen _Socklen) (errno int
}
_, errno = socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), to, uintptr(addrlen));
return;
-}
+}
func Listen(s int, n int) (errno int) {
_, errno = socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0);