aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-12-21 21:20:59 -0800
committerIan Lance Taylor <iant@golang.org>2020-12-22 12:13:13 -0800
commit3b2d8145a4c349058d76ce299ea7eea605572004 (patch)
tree004c66f4f6990bed01d4afe6ecac2727f38a5aaa /gcc/go
parent48357ce4f22c8298ea5fb01d6873bc7bf56180e5 (diff)
downloadgcc-3b2d8145a4c349058d76ce299ea7eea605572004.zip
gcc-3b2d8145a4c349058d76ce299ea7eea605572004.tar.gz
gcc-3b2d8145a4c349058d76ce299ea7eea605572004.tar.bz2
runtime: add "success" field to sudog
This is the gofrontend version of https://golang.org/cl/245019. Original CL description: The current wakeup protocol for channel communications is that the second goroutine sets gp.param to the sudog when a value is successfully communicated over the channel, and to nil when the wakeup is due to closing the channel. Setting nil to indicate channel closure works okay for chansend and chanrecv, because they're only communicating with one channel, so they know it must be the channel that was closed. However, it means selectgo has to re-poll all of the channels to figure out which one was closed. This commit adds a "success" field to sudog, and changes the wakeup protocol to always set gp.param to sg, and to use sg.success to indicate successful communication vs channel closure. While here, this also reorganizes the chansend code slightly so that the sudog is still released to the pool if the send blocks and then is awoken because the channel closed. For golang/go#40410 This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1, setting up for more compiler changes related to select handling. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279734
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a7df843..bb537f1 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-d0e56e82bb298268ec0f306fef99a715c892d4a7
+eca96e39cb895805b617e0e1f184f893ed3e46bb
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.