diff --git a/src/sync/atomic/norace.go b/src/sync/atomic/norace.go deleted file mode 100644 index 1866fd16cba..00000000000 --- a/src/sync/atomic/norace.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !race - -package atomic - -import "unsafe" - -const raceenabled = false - -func raceAcquire(addr unsafe.Pointer) { -} - -func raceReleaseMerge(addr unsafe.Pointer) { -} diff --git a/src/sync/atomic/race.go b/src/sync/atomic/race.go deleted file mode 100644 index a833d9e7f40..00000000000 --- a/src/sync/atomic/race.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build race - -package atomic - -import ( - "runtime" - "unsafe" -) - -const raceenabled = true - -func raceAcquire(addr unsafe.Pointer) { - runtime.RaceAcquire(addr) -} - -func raceReleaseMerge(addr unsafe.Pointer) { - runtime.RaceReleaseMerge(addr) -} diff --git a/src/sync/atomic/value.go b/src/sync/atomic/value.go index c290fdab850..ab46d9a240e 100644 --- a/src/sync/atomic/value.go +++ b/src/sync/atomic/value.go @@ -35,9 +35,6 @@ func (v *Value) Load() (x interface{}) { xp := (*ifaceWords)(unsafe.Pointer(&x)) xp.typ = typ xp.data = data - if raceenabled { - raceAcquire(unsafe.Pointer(v)) - } return } @@ -48,9 +45,6 @@ func (v *Value) Store(x interface{}) { if x == nil { panic("sync/atomic: store of nil value into Value") } - if raceenabled { - raceReleaseMerge(unsafe.Pointer(v)) - } vp := (*ifaceWords)(unsafe.Pointer(v)) xp := (*ifaceWords)(unsafe.Pointer(&x)) for {