regexp: use a very fast random generator for benchmarks.

Calls into math/rand are very slow, especially under race
detector because of heap accesses.

go test -bench . -run none -benchtime .1s
Before: 23.0s
After:  17.4s

Fixes issue 5837.

R=golang-dev, dave, r
CC=golang-dev
https://codereview.appspot.com/11564044
doc: fix wiki content error

Fixes issue 5898.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/11556043
runtime: add a missing newline in a debug printf.

Trivial, but annoying while debugging this code.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/11656043
net: implement netpoll for windows

Moves the network poller from net package into runtime.

benchmark                           old ns/op    new ns/op    delta
BenchmarkTCP4OneShot                   316386       287061   -9.27%
BenchmarkTCP4OneShot-2                 339822       313424   -7.77%
BenchmarkTCP4OneShot-3                 330057       306589   -7.11%
BenchmarkTCP4OneShotTimeout            341775       287061  -16.01%
BenchmarkTCP4OneShotTimeout-2          380835       295849  -22.32%
BenchmarkTCP4OneShotTimeout-3          398412       328070  -17.66%
BenchmarkTCP4Persistent                 40622        33392  -17.80%
BenchmarkTCP4Persistent-2               44528        35736  -19.74%
BenchmarkTCP4Persistent-3               44919        36907  -17.84%
BenchmarkTCP4PersistentTimeout          45309        33588  -25.87%
BenchmarkTCP4PersistentTimeout-2        50289        38079  -24.28%
BenchmarkTCP4PersistentTimeout-3        51559        37103  -28.04%
BenchmarkTCP6OneShot                   361305       345645   -4.33%
BenchmarkTCP6OneShot-2                 361305       331976   -8.12%
BenchmarkTCP6OneShot-3                 376929       347598   -7.78%
BenchmarkTCP6OneShotTimeout            361305       322212  -10.82%
BenchmarkTCP6OneShotTimeout-2          378882       333928  -11.86%
BenchmarkTCP6OneShotTimeout-3          388647       335881  -13.58%
BenchmarkTCP6Persistent                 47653        35345  -25.83%
BenchmarkTCP6Persistent-2               49215        35736  -27.39%
BenchmarkTCP6Persistent-3               38474        37493   -2.55%
BenchmarkTCP6PersistentTimeout          56637        34369  -39.32%
BenchmarkTCP6PersistentTimeout-2        42575        38079  -10.56%
BenchmarkTCP6PersistentTimeout-3        44137        37689  -14.61%

R=dvyukov
CC=golang-dev
https://codereview.appspot.com/8670044
net: remove unnecessary bit masking

R=dave
CC=golang-dev
https://codereview.appspot.com/11537044
runtime: clarify comment for m->locked

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/11671043
runtime: allow stack split in body of closechan
This gives more space during the call to runtime.lock.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/11679043
misc/cgo/test: add test for cgo callbacks with different amount of stack space available

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/11677043
runtime: introduce notetsleepg function
notetsleepg is the same as notetsleep, but is called on user g.
It includes entersyscall/exitsyscall and will help to avoid
split stack functions in syscall status.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/11681043
cmd/ld: fix warnings on Plan 9

src/cmd/ld/lib.c:1379 set and not used: p
src/cmd/ld/lib.c:1426 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1437 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1456 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1477 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1459 set and not used: started

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/11615044

Committer: Russ Cox <rsc@golang.org>
all: change "true iff" to "whether" in public docs

For consistency with Go documentation style.

R=golang-dev, khr
CC=golang-dev
https://codereview.appspot.com/11697043
runtime: Stop arm memmove corrupting its parameters

Change use of x+(SP) to access the stack frame into x-(SP)

Fixes issue 5925.

R=golang-dev, bradfitz, dave, remyoudompheng, nick, rsc
CC=dave cheney <dave, golang-dev
https://codereview.appspot.com/11647043

Committer: Dave Cheney <dave@cheney.net>
net: make use of noDeadline instead of time.Time{}

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/11691044
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.

Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.

These were edited by hand. A few were cleaned up in other ways.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/11699043
database/sql: close statement before connection

Fixes issue 5936

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/11620046
net/http: respect tls.Config.ServerName in Transport

When making an HTTPS client request, respect the
ServerName field in the tls.Config.

Fixes issue 5829

R=golang-dev, agl, adg
CC=golang-dev
https://codereview.appspot.com/11691043
math/rand: mention Seed in overview, add another top-level example

Fixes issue 5937.

R=golang-dev, mirtchovski, r
CC=golang-dev
https://codereview.appspot.com/11705043
misc/cgo/test: test recursive internal OS thread lock

This would have failed with CL 11663043.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/11480045
math/rand: mention that the default Source is thread-safe

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/11709043
runtime: reduce frame size for runtime.cgocallback_gofunc

Tying preemption to stack splits means that we have to able to
complete the call to exitsyscall (inside cgocallbackg at least for now)
without any stack split checks, meaning that the whole sequence
has to work within 128 bytes of stack, unless we increase the size
of the red zone. This CL frees up 24 bytes along that critical path
on amd64. (The 32-bit systems have plenty of space because all
their words are smaller.)

R=dvyukov
CC=golang-dev
https://codereview.appspot.com/11676043