~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/syscall/syscall_netbsd_amd64.go

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-07-08 05:52:37 UTC
  • mfrom: (29.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130708055237-at01839e0hp8z3ni
Tags: 2:1.1-1ubuntu1
016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
10
10
 
11
11
func NsecToTimespec(nsec int64) (ts Timespec) {
12
 
        ts.Sec = int32(nsec / 1e9)
13
 
        ts.Nsec = nsec % 1e9
 
12
        ts.Sec = int64(nsec / 1e9)
 
13
        ts.Nsec = int64(nsec % 1e9)
14
14
        return
15
15
}
16
16
 
18
18
 
19
19
func NsecToTimeval(nsec int64) (tv Timeval) {
20
20
        nsec += 999 // round up to microsecond
21
 
        tv.Usec = nsec % 1e9 / 1e3
 
21
        tv.Usec = int32(nsec % 1e9 / 1e3)
22
22
        tv.Sec = int64(nsec / 1e9)
23
23
        return
24
24
}
25
25
 
26
26
func SetKevent(k *Kevent_t, fd, mode, flags int) {
27
27
        k.Ident = uint64(fd)
28
 
        k.Filter = int16(mode)
29
 
        k.Flags = uint16(flags)
 
28
        k.Filter = uint32(mode)
 
29
        k.Flags = uint32(flags)
30
30
}
31
31
 
32
32
func (iov *Iovec) SetLen(length int) {