runtime: move darwin kevent calls to libc

kqueue, kevent, closeonexec, setitimer, with sysctl and fcntl helpers.

TODO:arm,arm64

Change-Id: I9386f377186d6ac7cb99064c524a67e0c8282eba
Reviewed-on: https://go-review.googlesource.com/118561
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Keith Randall 2018-06-13 08:20:23 -07:00
parent 537fb06c5d
commit 72c29fc8cd
12 changed files with 210 additions and 100 deletions

View file

@ -68,6 +68,12 @@ func lwp_self() int32
func osyield()
func kqueue() int32
//go:noescape
func kevent(kq int32, ch *keventt, nch int32, ev *keventt, nev int32, ts *timespec) int32
func closeonexec(fd int32)
const (
_ESRCH = 3
_ETIMEDOUT = 60