// Copyright 2009 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.// +build amd64,netbsdpackageunixfuncGetpagesize()int{return4096}funcTimespecToNsec(tsTimespec)int64{returnint64(ts.Sec)*1e9+int64(ts.Nsec)}funcNsecToTimespec(nsecint64)(tsTimespec){ts.Sec=int64(nsec/1e9)ts.Nsec=int64(nsec%1e9)return}funcNsecToTimeval(nsecint64)(tvTimeval){nsec+=999// round up to microsecondtv.Usec=int32(nsec%1e9/1e3)tv.Sec=int64(nsec/1e9)return}funcSetKevent(k*Kevent_t,fd,mode,flagsint){k.Ident=uint64(fd)k.Filter=uint32(mode)k.Flags=uint32(flags)}func(iov*Iovec)SetLen(lengthint){iov.Len=uint64(length)}func(msghdr*Msghdr)SetControllen(lengthint){msghdr.Controllen=uint32(length)}func(cmsg*Cmsghdr)SetLen(lengthint){cmsg.Len=uint32(length)}