diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-01-18 19:04:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-01-18 19:04:36 +0000 |
commit | 4f4a855d82a889cebcfca150a7a43909bcb6a346 (patch) | |
tree | f12bae0781920fa34669fe30b6f4615a86d9fb80 /libgo/go/sync | |
parent | 225220d668dafb8262db7012bced688acbe63b33 (diff) | |
download | gcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.zip gcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.tar.gz gcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.tar.bz2 |
libgo: update to Go1.12beta2
Reviewed-on: https://go-review.googlesource.com/c/158019
gotools/:
* Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release.
(GOTOOLS_TEST_TIMEOUT): Increase to 600.
(check-runtime): Export LD_LIBRARY_PATH before computing GOARCH
and GOOS.
(check-vet): Copy golang.org/x/tools into check-vet-dir.
* Makefile.in: Regenerate.
gcc/testsuite/:
* go.go-torture/execute/names-1.go: Stop using debug/xcoff, which
is no longer externally visible.
From-SVN: r268084
Diffstat (limited to 'libgo/go/sync')
-rw-r--r-- | libgo/go/sync/map.go | 12 | ||||
-rw-r--r-- | libgo/go/sync/runtime.go | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/libgo/go/sync/map.go b/libgo/go/sync/map.go index c4a0dc4..c6aa308 100644 --- a/libgo/go/sync/map.go +++ b/libgo/go/sync/map.go @@ -167,18 +167,14 @@ func (m *Map) Store(key, value interface{}) { // If the entry is expunged, tryStore returns false and leaves the entry // unchanged. func (e *entry) tryStore(i *interface{}) bool { - p := atomic.LoadPointer(&e.p) - if p == expunged { - return false - } for { - if atomic.CompareAndSwapPointer(&e.p, p, unsafe.Pointer(i)) { - return true - } - p = atomic.LoadPointer(&e.p) + p := atomic.LoadPointer(&e.p) if p == expunged { return false } + if atomic.CompareAndSwapPointer(&e.p, p, unsafe.Pointer(i)) { + return true + } } } diff --git a/libgo/go/sync/runtime.go b/libgo/go/sync/runtime.go index be16bcc..b6b9e48 100644 --- a/libgo/go/sync/runtime.go +++ b/libgo/go/sync/runtime.go @@ -54,7 +54,7 @@ func init() { } // Active spinning runtime support. -// runtime_canSpin returns true is spinning makes sense at the moment. +// runtime_canSpin reports whether spinning makes sense at the moment. func runtime_canSpin(i int) bool // runtime_doSpin does active spinning. |