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

     1  load("//pkg/sync/locking:locking.bzl", "declare_mutex")
     2  load("//tools:defs.bzl", "go_library", "go_test")
     3  
     4  package(
     5      default_applicable_licenses = ["//:license"],
     6      licenses = ["notice"],
     7  )
     8  
     9  declare_mutex(
    10      name = "vfs_mutex",
    11      out = "vfs_mutex.go",
    12      package = "pipe",
    13      prefix = "vfs",
    14  )
    15  
    16  declare_mutex(
    17      name = "pipe_mutex",
    18      out = "pipe_mutex.go",
    19      nested_lock_names = ["pipe"],
    20      package = "pipe",
    21      prefix = "pipe",
    22  )
    23  
    24  declare_mutex(
    25      name = "inode_mutex",
    26      out = "inode_mutex.go",
    27      package = "pipe",
    28      prefix = "inode",
    29  )
    30  
    31  go_library(
    32      name = "pipe",
    33      srcs = [
    34          "inode_mutex.go",
    35          "pipe.go",
    36          "pipe_mutex.go",
    37          "pipe_unsafe.go",
    38          "pipe_util.go",
    39          "save_restore.go",
    40          "vfs.go",
    41      ],
    42      visibility = ["//pkg/sentry:internal"],
    43      deps = [
    44          "//pkg/abi/linux",
    45          "//pkg/atomicbitops",
    46          "//pkg/context",
    47          "//pkg/errors/linuxerr",
    48          "//pkg/hostarch",
    49          "//pkg/log",
    50          "//pkg/marshal/primitive",
    51          "//pkg/safemem",
    52          "//pkg/sentry/arch",
    53          "//pkg/sentry/fsutil",
    54          "//pkg/sentry/vfs",
    55          "//pkg/sync",
    56          "//pkg/sync/locking",
    57          "//pkg/usermem",
    58          "//pkg/waiter",
    59          "@org_golang_x_sys//unix:go_default_library",
    60      ],
    61  )
    62  
    63  go_test(
    64      name = "pipe_test",
    65      size = "small",
    66      srcs = [
    67          "pipe_test.go",
    68      ],
    69      library = ":pipe",
    70      deps = [
    71          "//pkg/context",
    72          "//pkg/errors/linuxerr",
    73          "//pkg/sentry/contexttest",
    74          "//pkg/sentry/vfs",
    75          "//pkg/usermem",
    76          "//pkg/waiter",
    77      ],
    78  )