runtime: integrated network poller for darwin
vs tip:
benchmark old ns/op new ns/op delta
BenchmarkTCP4Persistent 67786 33175 -51.06%
BenchmarkTCP4Persistent-2 49085 31227 -36.38%
BenchmarkTCP4PersistentTimeout 69265 32565 -52.98%
BenchmarkTCP4PersistentTimeout-2 49217 32588 -33.79%
vs old scheduler:
benchmark old ns/op new ns/op delta
BenchmarkTCP4Persistent 63517 33175 -47.77%
BenchmarkTCP4Persistent-2 54760 31227 -42.97%
BenchmarkTCP4PersistentTimeout 63234 32565 -48.50%
BenchmarkTCP4PersistentTimeout-2 56956 32588 -42.78%
R=golang-dev, bradfitz, devon.odell, mikioh.mikioh, iant, rsc
CC=golang-dev, pabuhr
https://golang.org/cl/7569043
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 026c7a5..8858922 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -85,6 +85,7 @@
typedef struct ParFor ParFor;
typedef struct ParForThread ParForThread;
typedef struct CgoMal CgoMal;
+typedef struct PollDesc PollDesc;
/*
* Per-CPU declaration.
@@ -786,6 +787,9 @@
void runtime·addtimer(Timer*);
bool runtime·deltimer(Timer*);
G* runtime·netpoll(bool);
+void runtime·netpollinit(void);
+int32 runtime·netpollopen(int32, PollDesc*);
+void runtime·netpollready(G**, PollDesc*, int32);
#pragma varargck argpos runtime·printf 1
#pragma varargck type "d" int32