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")
|
2018-04-27 17:37:02 +00:00
|
|
|
|
|
|
|
package(
|
|
|
|
default_visibility = ["//:sandbox"],
|
2019-01-31 19:11:44 +00:00
|
|
|
licenses = ["notice"],
|
2018-04-27 17:37:02 +00:00
|
|
|
)
|
|
|
|
|
2019-05-30 19:01:41 +00:00
|
|
|
exports_files(["LICENSE"])
|
|
|
|
|
2018-10-03 20:50:58 +00:00
|
|
|
go_template(
|
|
|
|
name = "generic_atomicptr",
|
|
|
|
srcs = ["atomicptr_unsafe.go"],
|
|
|
|
types = [
|
|
|
|
"Value",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-04-27 17:37:02 +00:00
|
|
|
go_template(
|
|
|
|
name = "generic_seqatomic",
|
|
|
|
srcs = ["seqatomic_unsafe.go"],
|
|
|
|
types = [
|
|
|
|
"Value",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":sync",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
2020-01-10 06:00:42 +00:00
|
|
|
name = "sync",
|
2018-04-27 17:37:02 +00:00
|
|
|
srcs = [
|
2020-01-10 06:00:42 +00:00
|
|
|
"aliases.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"memmove_unsafe.go",
|
2020-04-02 18:55:55 +00:00
|
|
|
"mutex_unsafe.go",
|
2020-07-13 00:20:50 +00:00
|
|
|
"nocopy.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"norace_unsafe.go",
|
|
|
|
"race_unsafe.go",
|
2020-04-02 18:55:55 +00:00
|
|
|
"rwmutex_unsafe.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"seqcount.go",
|
2020-04-02 18:55:55 +00:00
|
|
|
"sync.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
2020-05-21 01:33:51 +00:00
|
|
|
marshal = False,
|
|
|
|
stateify = False,
|
2018-04-27 17:37:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
2020-01-10 06:00:42 +00:00
|
|
|
name = "sync_test",
|
2018-04-27 17:37:02 +00:00
|
|
|
size = "small",
|
|
|
|
srcs = [
|
2020-04-02 18:55:55 +00:00
|
|
|
"mutex_test.go",
|
|
|
|
"rwmutex_test.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"seqcount_test.go",
|
|
|
|
],
|
2020-01-27 18:04:07 +00:00
|
|
|
library = ":sync",
|
2018-04-27 17:37:02 +00:00
|
|
|
)
|