Vendor Update (#16121)
* update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-billy/v5 * update github.com/go-git/go-git/v5 * update github.com/go-redis/redis/v8 * update github.com/go-testfixtures/testfixtures/v3 * update github.com/jaytaylor/html2text * update github.com/json-iterator/go * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mattn/go-isatty * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/prometheus/client_golang * update github.com/unrolled/render * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * update github.com/yuin/goldmark-highlighting Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
f088dc4ea1
commit
86e2789960
819 changed files with 38072 additions and 34969 deletions
33
vendor/github.com/klauspost/cpuid/v2/os_linux_arm64.go
generated
vendored
33
vendor/github.com/klauspost/cpuid/v2/os_linux_arm64.go
generated
vendored
|
@ -11,7 +11,6 @@ import (
|
|||
"encoding/binary"
|
||||
"io/ioutil"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// HWCAP bits.
|
||||
|
@ -42,12 +41,9 @@ const (
|
|||
hwcap_ASIMDFHM = 1 << 23
|
||||
)
|
||||
|
||||
//go:linkname hwcap internal/cpu.HWCap
|
||||
var hwcap uint
|
||||
|
||||
func detectOS(c *CPUInfo) bool {
|
||||
// For now assuming no hyperthreading is reasonable.
|
||||
c.LogicalCores = int(getproccount())
|
||||
c.LogicalCores = runtime.NumCPU()
|
||||
c.PhysicalCores = c.LogicalCores
|
||||
c.ThreadsPerCore = 1
|
||||
if hwcap == 0 {
|
||||
|
@ -132,30 +128,3 @@ func detectOS(c *CPUInfo) bool {
|
|||
func isSet(hwc uint, value uint) bool {
|
||||
return hwc&value != 0
|
||||
}
|
||||
|
||||
//go:noescape
|
||||
//go:linkname sched_getaffinity runtime.sched_getaffinity
|
||||
func sched_getaffinity(pid, len uintptr, buf *byte) int32
|
||||
|
||||
func getproccount() int32 {
|
||||
// This buffer is huge (8 kB) but we are on the system stack
|
||||
// and there should be plenty of space (64 kB).
|
||||
// Also this is a leaf, so we're not holding up the memory for long.
|
||||
const maxCPUs = 64 * 1024
|
||||
var buf [maxCPUs / 8]byte
|
||||
r := sched_getaffinity(0, unsafe.Sizeof(buf), &buf[0])
|
||||
if r < 0 {
|
||||
return 0
|
||||
}
|
||||
n := int32(0)
|
||||
for _, v := range buf[:r] {
|
||||
for v != 0 {
|
||||
n += int32(v & 1)
|
||||
v >>= 1
|
||||
}
|
||||
}
|
||||
if n == 0 {
|
||||
n = 1
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue