summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/epoll/BUILD
blob: 723a85f644bf15be1a2e8244bbbccae58116d93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
load("//tools:defs.bzl", "go_library", "go_test")
load("//tools/go_generics:defs.bzl", "go_template_instance")

package(licenses = ["notice"])

go_template_instance(
    name = "epoll_list",
    out = "epoll_list.go",
    package = "epoll",
    prefix = "pollEntry",
    template = "//pkg/ilist:generic_list",
    types = {
        "Element": "*pollEntry",
        "Linker": "*pollEntry",
    },
)

go_library(
    name = "epoll",
    srcs = [
        "epoll.go",
        "epoll_list.go",
        "epoll_state.go",
    ],
    visibility = ["//pkg/sentry:internal"],
    deps = [
        "//pkg/abi/linux",
        "//pkg/context",
        "//pkg/refs",
        "//pkg/sentry/fs",
        "//pkg/sentry/fs/anon",
        "//pkg/sentry/fs/fsutil",
        "//pkg/sync",
        "//pkg/usermem",
        "//pkg/waiter",
        "@org_golang_x_sys//unix:go_default_library",
    ],
)

go_test(
    name = "epoll_test",
    size = "small",
    srcs = [
        "epoll_test.go",
    ],
    library = ":epoll",
    deps = [
        "//pkg/sentry/contexttest",
        "//pkg/sentry/fs/filetest",
        "//pkg/waiter",
    ],
)