summaryrefslogtreecommitdiffhomepage
path: root/pkg/sync/BUILD
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-01-13 12:22:15 -0800
committerKevin Krakauer <krakauer@google.com>2020-01-13 12:22:15 -0800
commit31e49f4b19309259baeeb63e7b6ef41f8edd6d35 (patch)
treead6cae1ad4f173946eb68156653bea84d7254f81 /pkg/sync/BUILD
parentd147e6d1b29d25607bcdcdb0beddb5122fea085e (diff)
parentb30cfb1df72e201c6caf576bbef8fcc968df2d41 (diff)
Merge branch 'master' into iptables-write-input-drop
Diffstat (limited to 'pkg/sync/BUILD')
-rw-r--r--pkg/sync/BUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkg/sync/BUILD b/pkg/sync/BUILD
new file mode 100644
index 000000000..e8cd16b8f
--- /dev/null
+++ b/pkg/sync/BUILD
@@ -0,0 +1,53 @@
+load("//tools/go_stateify:defs.bzl", "go_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_test")
+load("//tools/go_generics:defs.bzl", "go_template")
+
+package(
+ default_visibility = ["//:sandbox"],
+ licenses = ["notice"],
+)
+
+exports_files(["LICENSE"])
+
+go_template(
+ name = "generic_atomicptr",
+ srcs = ["atomicptr_unsafe.go"],
+ types = [
+ "Value",
+ ],
+)
+
+go_template(
+ name = "generic_seqatomic",
+ srcs = ["seqatomic_unsafe.go"],
+ types = [
+ "Value",
+ ],
+ deps = [
+ ":sync",
+ ],
+)
+
+go_library(
+ name = "sync",
+ srcs = [
+ "aliases.go",
+ "downgradable_rwmutex_unsafe.go",
+ "memmove_unsafe.go",
+ "norace_unsafe.go",
+ "race_unsafe.go",
+ "seqcount.go",
+ "syncutil.go",
+ ],
+ importpath = "gvisor.dev/gvisor/pkg/sync",
+)
+
+go_test(
+ name = "sync_test",
+ size = "small",
+ srcs = [
+ "downgradable_rwmutex_test.go",
+ "seqcount_test.go",
+ ],
+ embed = [":sync"],
+)