syscall: Use vsyscall for syscall.Gettimeofday and .Time on linux amd64.

Regenerate zsyscall_linux_*.go files with recent changes to
mksyscall.sh.

Add socketpair to syscall_linux_amd64.go; for some reason it
was in the generated file but not in the source file.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2190044
This commit is contained in:
Ian Lance Taylor 2010-09-21 06:49:56 -07:00
parent 4659f6de38
commit 7d03d0ec6b
8 changed files with 172 additions and 152 deletions

View file

@ -37,6 +37,7 @@ package syscall
//sys setgroups(n int, list *_Gid_t) (errno int)
//sys setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int)
//sys socket(domain int, typ int, proto int) (fd int, errno int)
//sys socketpair(domain int, typ int, proto int, fd *[2]int) (errno int)
//sys getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)
@ -44,6 +45,9 @@ package syscall
func Getpagesize() int { return 4096 }
func Gettimeofday(tv *Timeval) (errno int)
func Time(t *Time_t) (tt Time_t, errno int)
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {