mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
This package was used for VFS1 device number assignment. PiperOrigin-RevId: 538918926
78 lines
1.6 KiB
Python
78 lines
1.6 KiB
Python
load("//tools:defs.bzl", "go_library", "go_test")
|
|
load("//pkg/sync/locking:locking.bzl", "declare_mutex")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
declare_mutex(
|
|
name = "vfs_mutex",
|
|
out = "vfs_mutex.go",
|
|
package = "pipe",
|
|
prefix = "vfs",
|
|
)
|
|
|
|
declare_mutex(
|
|
name = "pipe_mutex",
|
|
out = "pipe_mutex.go",
|
|
nested_lock_names = ["pipe"],
|
|
package = "pipe",
|
|
prefix = "pipe",
|
|
)
|
|
|
|
declare_mutex(
|
|
name = "inode_mutex",
|
|
out = "inode_mutex.go",
|
|
package = "pipe",
|
|
prefix = "inode",
|
|
)
|
|
|
|
go_library(
|
|
name = "pipe",
|
|
srcs = [
|
|
"inode_mutex.go",
|
|
"pipe.go",
|
|
"pipe_mutex.go",
|
|
"pipe_unsafe.go",
|
|
"pipe_util.go",
|
|
"save_restore.go",
|
|
"vfs.go",
|
|
],
|
|
visibility = ["//pkg/sentry:internal"],
|
|
deps = [
|
|
"//pkg/abi/linux",
|
|
"//pkg/atomicbitops",
|
|
"//pkg/context",
|
|
"//pkg/errors/linuxerr",
|
|
"//pkg/hostarch",
|
|
"//pkg/marshal/primitive",
|
|
"//pkg/safemem",
|
|
"//pkg/sentry/arch",
|
|
"//pkg/sentry/fsutil",
|
|
"//pkg/sentry/vfs",
|
|
"//pkg/sync",
|
|
"//pkg/sync/locking",
|
|
"//pkg/usermem",
|
|
"//pkg/waiter",
|
|
"@org_golang_x_sys//unix:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "pipe_test",
|
|
size = "small",
|
|
srcs = [
|
|
"pipe_test.go",
|
|
],
|
|
library = ":pipe",
|
|
deps = [
|
|
"//pkg/context",
|
|
"//pkg/errors/linuxerr",
|
|
"//pkg/sentry/contexttest",
|
|
"//pkg/sentry/vfs",
|
|
"//pkg/usermem",
|
|
"//pkg/waiter",
|
|
],
|
|
)
|