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

@ -18,9 +18,6 @@ func mach_reply_port() uint32
func mach_task_self() uint32
func mach_thread_self() uint32
//go:noescape
func sysctl(mib *uint32, miblen uint32, out *byte, size *uintptr, dst *byte, ndst uintptr) int32
func unimplemented(name string) {
println(name, "not implemented")
*(*int)(unsafe.Pointer(uintptr(1231))) = 1231
@ -498,9 +495,6 @@ const (
_SS_DISABLE = 4
)
//go:noescape
func setitimer(mode int32, new, old *itimerval)
//extern SigTabTT runtime·sigtab[];
type sigset uint32