aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/netpoll_select.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-18runtime: copy netpoll code from Go 1.7 runtimeIan Lance Taylor1-256/+0
Reviewed-on: https://go-review.googlesource.com/31325 From-SVN: r241307
2016-10-13runtime: copy mstats code from Go 1.7 runtimeIan Lance Taylor1-2/+2
This replaces mem.go and the C runtime_ReadMemStats function with the Go 1.7 mstats.go. The GCStats code is commented out for now. The corresponding gccgo code is in runtime/mgc0.c. The variables memstats and worldsema are shared between the Go code and the C code, but are not exported. To make this work, add temporary accessor functions acquireWorldsema, releaseWorldsema, getMstats (the latter known as mstats in the C code). Check the preemptoff field of m when allocating and when considering whether to start a GC. This works with the new stopTheWorld and startTheWorld functions in Go, which are essentially the Go 1.7 versions. Change the compiler to stack allocate closures when compiling the runtime package. Within the runtime packages closures do not escape. This is similar to what the gc compiler does, except that the gc compiler, when compiling the runtime package, gives an error if escape analysis shows that a closure does escape. I added this here because the Go version of ReadMemStats calls systemstack with a closure, and having that allocate memory was causing some tests that measure memory allocations to fail. Reviewed-on: https://go-review.googlesource.com/30972 From-SVN: r241124
2015-11-26re PR go/61303 (gccgo: segfault, regression since 4.8.2)Ian Lance Taylor1-6/+10
PR go/61303 runtime: don't overallocate in select code If we've already allocated an fd_set, don't allocate another one. Also, don't bother to read from rdwake if it wasn't returned in select. Fixes https://gcc.gnu.org/PR61303. Reviewed-on: https://go-review.googlesource.com/17243 From-SVN: r230922
2014-06-06libgo: Merge to master revision 19184.Ian Lance Taylor1-2/+2
The next revision, 19185, renames several runtime files, and will be handled in a separate change. From-SVN: r211328
2014-01-08re PR go/59433 (Many 64-bit Go tests SEGV on Solaris)Ian Lance Taylor1-16/+45
PR go/59433 net: Don't use stack space for fd_sets when using select. From-SVN: r206411
2013-11-14runtime: Add netpoll code that uses select.Ian Lance Taylor1-0/+223
Required for Solaris support. From-SVN: r204817