summaryrefslogtreecommitdiffhomepage
path: root/pkg/eventfd/BUILD
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2021-10-07 17:37:50 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-07 17:41:20 -0700
commite44b100654ca639d11221e547384f699e461296d (patch)
tree950811fef6620dea99871f63e82a08cfa06849bf /pkg/eventfd/BUILD
parent487651ac46f302592ccffc9e5a4336a331010e42 (diff)
add convenient wrapper for eventfd
The same create/write/read pattern is copied around several places. It's easier to understand in a package with names and comments, and we can reuse the smart blocking code in package rawfile. PiperOrigin-RevId: 401647108
Diffstat (limited to 'pkg/eventfd/BUILD')
-rw-r--r--pkg/eventfd/BUILD22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkg/eventfd/BUILD b/pkg/eventfd/BUILD
new file mode 100644
index 000000000..02407cb99
--- /dev/null
+++ b/pkg/eventfd/BUILD
@@ -0,0 +1,22 @@
+load("//tools:defs.bzl", "go_library", "go_test")
+
+package(licenses = ["notice"])
+
+go_library(
+ name = "eventfd",
+ srcs = [
+ "eventfd.go",
+ ],
+ visibility = ["//:sandbox"],
+ deps = [
+ "//pkg/hostarch",
+ "//pkg/tcpip/link/rawfile",
+ "@org_golang_x_sys//unix:go_default_library",
+ ],
+)
+
+go_test(
+ name = "eventfd_test",
+ srcs = ["eventfd_test.go"],
+ library = ":eventfd",
+)