gvisor/third_party/gvsync
Jamie Liu 9e1cbdf565 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
2019-09-06 17:25:07 -07:00
..
atomicptrtest build: add nogo for static validation 2019-07-09 16:44:06 -07:00
seqatomictest build: add nogo for static validation 2019-07-09 16:44:06 -07:00
BUILD Update canonical repository. 2019-06-13 16:50:15 -07:00
LICENSE Move package sync to third_party 2019-01-31 17:49:14 -08:00
README.md Move package sync to third_party 2019-01-31 17:49:14 -08:00
atomicptr_unsafe.go gvisor: lockless read access for task credentials 2019-06-25 09:52:49 -07:00
downgradable_rwmutex_1_12_unsafe.go Add build guard to files using go:linkname 2019-05-30 12:09:39 -07:00
downgradable_rwmutex_1_13_unsafe.go Add build guard to files using go:linkname 2019-05-30 12:09:39 -07:00
downgradable_rwmutex_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
downgradable_rwmutex_unsafe.go Indicate flipcall synchronization to the Go race detector. 2019-09-06 17:25:07 -07:00
gvsync.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
memmove_unsafe.go Add build guard to files using go:linkname 2019-05-30 12:09:39 -07:00
norace_unsafe.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
race_unsafe.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
seqatomic_unsafe.go Update canonical repository. 2019-06-13 16:50:15 -07:00
seqcount.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
seqcount_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00

README.md

This package provides additional synchronization primitives not provided by the Go stdlib 'sync' package. It is partially derived from the upstream 'sync' package.