2019-02-01 01:47:24 +00:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
2018-10-23 07:19:11 +00:00
|
|
|
|
2019-01-31 19:11:44 +00:00
|
|
|
package(licenses = ["notice"])
|
2018-10-03 20:50:58 +00:00
|
|
|
|
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "atomicptr_int",
|
2019-07-09 23:42:54 +00:00
|
|
|
out = "atomicptr_int_unsafe.go",
|
2018-10-03 20:50:58 +00:00
|
|
|
package = "atomicptr",
|
|
|
|
suffix = "Int",
|
2019-02-01 01:47:24 +00:00
|
|
|
template = "//third_party/gvsync:generic_atomicptr",
|
2018-10-03 20:50:58 +00:00
|
|
|
types = {
|
|
|
|
"Value": "int",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "atomicptr",
|
2019-07-09 23:42:54 +00:00
|
|
|
srcs = ["atomicptr_int_unsafe.go"],
|
2019-06-13 23:49:09 +00:00
|
|
|
importpath = "gvisor.dev/gvisor/third_party/gvsync/atomicptr",
|
2018-10-03 20:50:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "atomicptr_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["atomicptr_test.go"],
|
|
|
|
embed = [":atomicptr"],
|
|
|
|
)
|