summaryrefslogtreecommitdiffhomepage
path: root/pkg/flipcall/ctrl_futex.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/flipcall/ctrl_futex.go')
-rw-r--r--pkg/flipcall/ctrl_futex.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/flipcall/ctrl_futex.go b/pkg/flipcall/ctrl_futex.go
index 2e8452a02..99410628f 100644
--- a/pkg/flipcall/ctrl_futex.go
+++ b/pkg/flipcall/ctrl_futex.go
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build go1.1
+// +build go1.1
+
package flipcall
import (
@@ -118,7 +121,7 @@ func (ep *Endpoint) ctrlWaitFirst() error {
return ep.futexWaitUntilActive()
}
-func (ep *Endpoint) ctrlRoundTrip() error {
+func (ep *Endpoint) ctrlRoundTrip(mayRetainP bool) error {
if err := ep.enterFutexWait(); err != nil {
return err
}
@@ -130,6 +133,9 @@ func (ep *Endpoint) ctrlRoundTrip() error {
if err := ep.futexWakePeer(); err != nil {
return err
}
+ // Since we don't know if the peer Endpoint is in the same process as this
+ // one (in which case it may need our P to run), we allow our P to be
+ // retaken regardless of mayRetainP.
return ep.futexWaitUntilActive()
}