diff options
author | Felix Lange <fjl@twurst.com> | 2016-08-30 18:20:34 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-30 18:20:34 +0800 |
commit | 3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96 (patch) | |
tree | 596d8881580b2812d4a65e50ea14962cbea8334a /Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go | |
parent | 969008dbb007bb3f05dd6f66b5a91cb38c21ab54 (diff) | |
download | go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar.gz go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar.bz2 go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar.lz go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar.xz go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.tar.zst go-tangerine-3b75d0ce2373c6e6da9af5f341d2d0aae0b4ed96.zip |
Godeps: update golang.org/x/...
Diffstat (limited to 'Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go')
-rw-r--r-- | Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go b/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go index 7171219af..2b881b979 100644 --- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go +++ b/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go @@ -24,8 +24,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) { return } -func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } - func NsecToTimeval(nsec int64) (tv Timeval) { nsec += 999 // round up to microsecond tv.Sec = int32(nsec / 1e9) @@ -93,6 +91,8 @@ func Pipe2(p []int, flags int) (err error) { //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Pause() (err error) func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { page := uintptr(offset / 4096) @@ -181,6 +181,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) +//sys Utime(path string, buf *Utimbuf) (err error) + // On x86 Linux, all the socket calls go through an extra indirection, // I think because the 5-register system call interface can't handle // the 6-argument calls like sendto and recvfrom. Instead the @@ -386,3 +388,12 @@ func (msghdr *Msghdr) SetControllen(length int) { func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} |