// 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,openbsdpackageunixfuncGetpagesize()int{return4096}funcTimespecToNsec(tsTimespec)int64{returnint64(ts.Sec)*1e9+int64(ts.Nsec)}funcNsecToTimespec(nsecint64)(tsTimespec){ts.Sec=nsec/1e9ts.Nsec=nsec%1e9return}funcNsecToTimeval(nsecint64)(tvTimeval){nsec+=999// round up to microsecondtv.Usec=nsec%1e9/1e3tv.Sec=nsec/1e9return}funcSetKevent(k*Kevent_t,fd,mode,flagsint){k.Ident=uint64(fd)k.Filter=int16(mode)k.Flags=uint16(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)}