From 9e1cbdf565a1f5bf5bbc84bad0103fe2289e817c Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Fri, 6 Sep 2019 17:23:15 -0700 Subject: Indicate flipcall synchronization to the Go race detector. Since each Endpoint has a distinct mapping of the packet window, the Go race detector does not recognize accesses by connected Endpoints to be related. This means that this change isn't necessary for the Go race detector to accept accesses of flipcall.Endpoint.Data(), but it *is* necessary for it to accept accesses to shared variables outside the scope of flipcall that are synchronized by flipcall.Endpoint state; see updated test for an example. RaceReleaseMerge is needed (instead of RaceRelease) because calls to raceBecomeInactive() from *unrelated* Endpoints can occur in any order. (DowngradableRWMutex.RUnlock() has a similar property: calls to RUnlock() on the same DowngradableRWMutex from different goroutines can occur in any order. Remove the TODO asking to explain this now that this is understood.) PiperOrigin-RevId: 267705325 --- pkg/flipcall/BUILD | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/flipcall/BUILD') diff --git a/pkg/flipcall/BUILD b/pkg/flipcall/BUILD index bd1d614b6..c1e078c7c 100644 --- a/pkg/flipcall/BUILD +++ b/pkg/flipcall/BUILD @@ -18,6 +18,7 @@ go_library( "//pkg/abi/linux", "//pkg/log", "//pkg/memutil", + "//third_party/gvsync", ], ) -- cgit v1.2.3