summaryrefslogtreecommitdiffhomepage
path: root/pkg/cpuid
diff options
context:
space:
mode:
authorZhaozhong Ni <nzz@google.com>2018-08-01 15:42:07 -0700
committerShentubot <shentubot@google.com>2018-08-01 15:43:24 -0700
commitb9e1cf8404ce1263176643dee1a1cc835c9d1448 (patch)
tree5382c24abb8c19a50fe714af8bb83e1fff6eaa31 /pkg/cpuid
parent6b87378634e1575cf590b7558f19b40b012849c2 (diff)
stateify: convert all packages to use explicit mode.
PiperOrigin-RevId: 207007153 Change-Id: Ifedf1cc3758dc18be16647a4ece9c840c1c636c9
Diffstat (limited to 'pkg/cpuid')
-rw-r--r--pkg/cpuid/BUILD15
-rw-r--r--pkg/cpuid/cpuid.go2
2 files changed, 4 insertions, 13 deletions
diff --git a/pkg/cpuid/BUILD b/pkg/cpuid/BUILD
index 9a0ca1b33..46fc4703b 100644
--- a/pkg/cpuid/BUILD
+++ b/pkg/cpuid/BUILD
@@ -1,27 +1,16 @@
package(licenses = ["notice"]) # Apache 2.0
-load("//tools/go_stateify:defs.bzl", "go_library", "go_stateify", "go_test")
-
-go_stateify(
- name = "cpuid_state",
- srcs = ["cpuid.go"],
- out = "cpuid_state.go",
- package = "cpuid",
-)
+load("//tools/go_stateify:defs.bzl", "go_library", "go_test")
go_library(
name = "cpuid",
srcs = [
"cpu_amd64.s",
"cpuid.go",
- "cpuid_state.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/cpuid",
visibility = ["//:sandbox"],
- deps = [
- "//pkg/log",
- "//pkg/state",
- ],
+ deps = ["//pkg/log"],
)
go_test(
diff --git a/pkg/cpuid/cpuid.go b/pkg/cpuid/cpuid.go
index b486ab037..e91e34dc7 100644
--- a/pkg/cpuid/cpuid.go
+++ b/pkg/cpuid/cpuid.go
@@ -409,6 +409,8 @@ func (f Feature) flagString(cpuinfoOnly bool) string {
}
// FeatureSet is a set of Features for a cpu.
+//
+// +stateify savable
type FeatureSet struct {
// Set is the set of features that are enabled in this FeatureSet.
Set map[Feature]bool