aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/internal/atomic
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2015-11-12 12:09:29 -0500
committerMichael Matloob <matloob@golang.org>2015-11-12 17:37:22 +0000
commit80d0b98d809361c862670bd7293fbca22055581f (patch)
tree21a4c3512206cb6b15bcdb652efcacc779f0c601 /src/runtime/internal/atomic
parentbbd1a1c706659ae489b174e2a4a707bbc626d5af (diff)
downloadgo-80d0b98d809361c862670bd7293fbca22055581f.tar.xz
runtime/internal/atomic: delete arch1_*.go files
I made a copy of the per-arch _CacheLineSize definitons when checking in runtime/internal/atomic. Now that runtime/internal/sys is checked in, we can use the definition there. Change-Id: I7242f6b633e4164f033b67ff471416b9d71c64d2 Reviewed-on: https://go-review.googlesource.com/16847 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/internal/atomic')
-rw-r--r--src/runtime/internal/atomic/arch1_386.go9
-rw-r--r--src/runtime/internal/atomic/arch1_amd64.go9
-rw-r--r--src/runtime/internal/atomic/arch1_amd64p32.go14
-rw-r--r--src/runtime/internal/atomic/arch1_arm.go9
-rw-r--r--src/runtime/internal/atomic/arch1_arm64.go9
-rw-r--r--src/runtime/internal/atomic/arch1_mips64.go9
-rw-r--r--src/runtime/internal/atomic/arch1_mips64le.go9
-rw-r--r--src/runtime/internal/atomic/arch1_ppc64.go9
-rw-r--r--src/runtime/internal/atomic/arch1_ppc64le.go9
-rw-r--r--src/runtime/internal/atomic/atomic_arm.go7
10 files changed, 5 insertions, 88 deletions
diff --git a/src/runtime/internal/atomic/arch1_386.go b/src/runtime/internal/atomic/arch1_386.go
deleted file mode 100644
index 76a9e2ecc4..0000000000
--- a/src/runtime/internal/atomic/arch1_386.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2011 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.
-
-package atomic
-
-const (
- _CacheLineSize = 64
-)
diff --git a/src/runtime/internal/atomic/arch1_amd64.go b/src/runtime/internal/atomic/arch1_amd64.go
deleted file mode 100644
index 76a9e2ecc4..0000000000
--- a/src/runtime/internal/atomic/arch1_amd64.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2011 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.
-
-package atomic
-
-const (
- _CacheLineSize = 64
-)
diff --git a/src/runtime/internal/atomic/arch1_amd64p32.go b/src/runtime/internal/atomic/arch1_amd64p32.go
deleted file mode 100644
index 7bb6e1aaf9..0000000000
--- a/src/runtime/internal/atomic/arch1_amd64p32.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2011 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.
-
-package atomic
-
-const (
- thechar = '6'
- _BigEndian = 0
- _CacheLineSize = 64
- _PCQuantum = 1
- _Int64Align = 8
- hugePageSize = 1 << 21
-)
diff --git a/src/runtime/internal/atomic/arch1_arm.go b/src/runtime/internal/atomic/arch1_arm.go
deleted file mode 100644
index d9b997c5ca..0000000000
--- a/src/runtime/internal/atomic/arch1_arm.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2011 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.
-
-package atomic
-
-const (
- _CacheLineSize = 32
-)
diff --git a/src/runtime/internal/atomic/arch1_arm64.go b/src/runtime/internal/atomic/arch1_arm64.go
deleted file mode 100644
index d9b997c5ca..0000000000
--- a/src/runtime/internal/atomic/arch1_arm64.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2011 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.
-
-package atomic
-
-const (
- _CacheLineSize = 32
-)
diff --git a/src/runtime/internal/atomic/arch1_mips64.go b/src/runtime/internal/atomic/arch1_mips64.go
deleted file mode 100644
index 0fd9510bdc..0000000000
--- a/src/runtime/internal/atomic/arch1_mips64.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 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.
-
-package atomic
-
-const (
- _CacheLineSize = 32
-)
diff --git a/src/runtime/internal/atomic/arch1_mips64le.go b/src/runtime/internal/atomic/arch1_mips64le.go
deleted file mode 100644
index 0fd9510bdc..0000000000
--- a/src/runtime/internal/atomic/arch1_mips64le.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 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.
-
-package atomic
-
-const (
- _CacheLineSize = 32
-)
diff --git a/src/runtime/internal/atomic/arch1_ppc64.go b/src/runtime/internal/atomic/arch1_ppc64.go
deleted file mode 100644
index 815a5840f7..0000000000
--- a/src/runtime/internal/atomic/arch1_ppc64.go
+++ /dev/null
@@ -1,9 +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.
-
-package atomic
-
-const (
- _CacheLineSize = 64
-)
diff --git a/src/runtime/internal/atomic/arch1_ppc64le.go b/src/runtime/internal/atomic/arch1_ppc64le.go
deleted file mode 100644
index 815a5840f7..0000000000
--- a/src/runtime/internal/atomic/arch1_ppc64le.go
+++ /dev/null
@@ -1,9 +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.
-
-package atomic
-
-const (
- _CacheLineSize = 64
-)
diff --git a/src/runtime/internal/atomic/atomic_arm.go b/src/runtime/internal/atomic/atomic_arm.go
index 1f33eef3c4..c361aef382 100644
--- a/src/runtime/internal/atomic/atomic_arm.go
+++ b/src/runtime/internal/atomic/atomic_arm.go
@@ -6,7 +6,10 @@
package atomic
-import "unsafe"
+import (
+ "runtime/internal/sys"
+ "unsafe"
+)
type spinlock struct {
v uint32
@@ -28,7 +31,7 @@ func (l *spinlock) unlock() {
var locktab [57]struct {
l spinlock
- pad [_CacheLineSize - unsafe.Sizeof(spinlock{})]byte
+ pad [sys.CacheLineSize - unsafe.Sizeof(spinlock{})]byte
}
func addrLock(addr *uint64) *spinlock {