mirror of
https://github.com/golang/go
synced 2024-11-18 02:14:45 -07:00
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>
This commit is contained in:
parent
bbd1a1c706
commit
80d0b98d80
2
src/cmd/dist/deps.go
vendored
2
src/cmd/dist/deps.go
vendored
@ -41,7 +41,7 @@ var builddeps = map[string][]string{
|
|||||||
"regexp": {"bytes", "errors", "io", "math", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
|
"regexp": {"bytes", "errors", "io", "math", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
|
||||||
"regexp/syntax": {"bytes", "errors", "io", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
|
"regexp/syntax": {"bytes", "errors", "io", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
|
||||||
"runtime": {"runtime/internal/atomic", "runtime/internal/sys"},
|
"runtime": {"runtime/internal/atomic", "runtime/internal/sys"},
|
||||||
"runtime/internal/atomic": {},
|
"runtime/internal/atomic": {"runtime/internal/sys"},
|
||||||
"runtime/internal/sys": {},
|
"runtime/internal/sys": {},
|
||||||
"sort": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
|
"sort": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
|
||||||
"strconv": {"errors", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "unicode/utf8"},
|
"strconv": {"errors", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "unicode/utf8"},
|
||||||
|
@ -38,7 +38,7 @@ var pkgDeps = map[string][]string{
|
|||||||
"io": {"errors", "sync"},
|
"io": {"errors", "sync"},
|
||||||
"runtime": {"unsafe", "runtime/internal/atomic", "runtime/internal/sys"},
|
"runtime": {"unsafe", "runtime/internal/atomic", "runtime/internal/sys"},
|
||||||
"runtime/internal/sys": {},
|
"runtime/internal/sys": {},
|
||||||
"runtime/internal/atomic": {"unsafe"},
|
"runtime/internal/atomic": {"unsafe", "runtime/internal/sys"},
|
||||||
"sync": {"runtime", "sync/atomic", "unsafe"},
|
"sync": {"runtime", "sync/atomic", "unsafe"},
|
||||||
"sync/atomic": {"unsafe"},
|
"sync/atomic": {"unsafe"},
|
||||||
"unsafe": {},
|
"unsafe": {},
|
||||||
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -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
|
|
||||||
)
|
|
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
package atomic
|
package atomic
|
||||||
|
|
||||||
import "unsafe"
|
import (
|
||||||
|
"runtime/internal/sys"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
type spinlock struct {
|
type spinlock struct {
|
||||||
v uint32
|
v uint32
|
||||||
@ -28,7 +31,7 @@ func (l *spinlock) unlock() {
|
|||||||
|
|
||||||
var locktab [57]struct {
|
var locktab [57]struct {
|
||||||
l spinlock
|
l spinlock
|
||||||
pad [_CacheLineSize - unsafe.Sizeof(spinlock{})]byte
|
pad [sys.CacheLineSize - unsafe.Sizeof(spinlock{})]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func addrLock(addr *uint64) *spinlock {
|
func addrLock(addr *uint64) *spinlock {
|
||||||
|
Loading…
Reference in New Issue
Block a user