![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [github.com/containerd/cgroups/v3](https://github.com/containerd/cgroups) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/containerd/cgroups/releases) - [Commits](https://github.com/containerd/cgroups/compare/v3.0.2...v3.0.3) --- updated-dependencies: - dependency-name: github.com/containerd/cgroups/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
44 lines
838 B
Go
44 lines
838 B
Go
package internal
|
|
|
|
import (
|
|
"runtime"
|
|
)
|
|
|
|
// PlatformPrefix returns the platform-dependent syscall wrapper prefix used by
|
|
// the linux kernel.
|
|
//
|
|
// Based on https://github.com/golang/go/blob/master/src/go/build/syslist.go
|
|
// and https://github.com/libbpf/libbpf/blob/master/src/libbpf.c#L10047
|
|
func PlatformPrefix() string {
|
|
switch runtime.GOARCH {
|
|
case "386":
|
|
return "__ia32_"
|
|
case "amd64", "amd64p32":
|
|
return "__x64_"
|
|
|
|
case "arm", "armbe":
|
|
return "__arm_"
|
|
case "arm64", "arm64be":
|
|
return "__arm64_"
|
|
|
|
case "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le":
|
|
return "__mips_"
|
|
|
|
case "s390":
|
|
return "__s390_"
|
|
case "s390x":
|
|
return "__s390x_"
|
|
|
|
case "riscv", "riscv64":
|
|
return "__riscv_"
|
|
|
|
case "ppc":
|
|
return "__powerpc_"
|
|
case "ppc64", "ppc64le":
|
|
return "__powerpc64_"
|
|
|
|
default:
|
|
return ""
|
|
}
|
|
}
|