2020-01-27 18:04:07 +00:00
|
|
|
load("//tools:defs.bzl", "go_library", "go_test")
|
2019-10-16 23:27:55 +00:00
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
2018-10-23 07:19:11 +00:00
|
|
|
|
2019-01-31 19:11:44 +00:00
|
|
|
package(licenses = ["notice"])
|
2018-04-27 17:37:02 +00:00
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "seqatomic_int",
|
2019-07-09 23:42:54 +00:00
|
|
|
out = "seqatomic_int_unsafe.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
package = "seqatomic",
|
|
|
|
suffix = "Int",
|
2020-01-10 06:00:42 +00:00
|
|
|
template = "//pkg/sync:generic_seqatomic",
|
2018-04-27 17:37:02 +00:00
|
|
|
types = {
|
|
|
|
"Value": "int",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "seqatomic",
|
2019-07-09 23:42:54 +00:00
|
|
|
srcs = ["seqatomic_int_unsafe.go"],
|
2018-04-27 17:37:02 +00:00
|
|
|
deps = [
|
2020-01-10 06:00:42 +00:00
|
|
|
"//pkg/sync",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "seqatomic_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["seqatomic_test.go"],
|
2020-01-27 18:04:07 +00:00
|
|
|
library = ":seqatomic",
|
2020-01-10 06:00:42 +00:00
|
|
|
deps = ["//pkg/sync"],
|
2018-04-27 17:37:02 +00:00
|
|
|
)
|