gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/kernel/semaphore/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  package(
     5      default_applicable_licenses = ["//:license"],
     6      licenses = ["notice"],
     7  )
     8  
     9  go_template_instance(
    10      name = "waiter_list",
    11      out = "waiter_list.go",
    12      package = "semaphore",
    13      prefix = "waiter",
    14      template = "//pkg/ilist:generic_list",
    15      types = {
    16          "Element": "*waiter",
    17          "Linker": "*waiter",
    18      },
    19  )
    20  
    21  go_library(
    22      name = "semaphore",
    23      srcs = [
    24          "semaphore.go",
    25          "waiter_list.go",
    26      ],
    27      visibility = ["//pkg/sentry:internal"],
    28      deps = [
    29          "//pkg/abi/linux",
    30          "//pkg/context",
    31          "//pkg/errors/linuxerr",
    32          "//pkg/sentry/kernel/auth",
    33          "//pkg/sentry/kernel/ipc",
    34          "//pkg/sentry/kernel/time",
    35          "//pkg/sentry/vfs",
    36          "//pkg/sync",
    37      ],
    38  )
    39  
    40  go_test(
    41      name = "semaphore_test",
    42      size = "small",
    43      srcs = ["semaphore_test.go"],
    44      library = ":semaphore",
    45      deps = [
    46          "//pkg/abi/linux",  # keep
    47          "//pkg/context",  # keep
    48          "//pkg/errors/linuxerr",  #keep
    49          "//pkg/sentry/contexttest",  # keep
    50          "//pkg/sentry/kernel/auth",  # keep
    51          "//pkg/sentry/kernel/ipc",  # keep
    52      ],
    53  )