gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/fsimpl/cgroupfs/BUILD (about) 1 load("//pkg/sync/locking:locking.bzl", "declare_mutex", "declare_rwmutex") 2 load("//tools:defs.bzl", "go_library", "go_test") 3 load("//tools/go_generics:defs.bzl", "go_template_instance") 4 5 package(default_applicable_licenses = ["//:license"]) 6 7 licenses(["notice"]) 8 9 declare_mutex( 10 name = "pids_controller_mutex", 11 out = "pids_controller_mutex.go", 12 package = "cgroupfs", 13 prefix = "pidsController", 14 ) 15 16 declare_rwmutex( 17 name = "task_mutex", 18 out = "task_mutex.go", 19 package = "cgroupfs", 20 prefix = "task", 21 ) 22 23 go_template_instance( 24 name = "dir_refs", 25 out = "dir_refs.go", 26 package = "cgroupfs", 27 prefix = "dir", 28 template = "//pkg/refs:refs_template", 29 types = { 30 "T": "dir", 31 }, 32 ) 33 34 go_library( 35 name = "cgroupfs", 36 srcs = [ 37 "base.go", 38 "bitmap.go", 39 "cgroupfs.go", 40 "cpu.go", 41 "cpuacct.go", 42 "cpuset.go", 43 "devices.go", 44 "dir_refs.go", 45 "job.go", 46 "memory.go", 47 "pids.go", 48 "pids_controller_mutex.go", 49 "task_mutex.go", 50 ], 51 visibility = ["//pkg/sentry:internal"], 52 deps = [ 53 "//pkg/abi/linux", 54 "//pkg/atomicbitops", 55 "//pkg/bitmap", 56 "//pkg/context", 57 "//pkg/coverage", 58 "//pkg/errors/linuxerr", 59 "//pkg/fspath", 60 "//pkg/hostarch", 61 "//pkg/log", 62 "//pkg/refs", 63 "//pkg/sentry/arch", 64 "//pkg/sentry/fsimpl/kernfs", 65 "//pkg/sentry/kernel", 66 "//pkg/sentry/kernel/auth", 67 "//pkg/sentry/memmap", 68 "//pkg/sentry/usage", 69 "//pkg/sentry/vfs", 70 "//pkg/sync", 71 "//pkg/sync/locking", 72 "//pkg/usermem", 73 ], 74 ) 75 76 go_test( 77 name = "cgroupfs_test", 78 size = "small", 79 srcs = ["bitmap_test.go"], 80 library = ":cgroupfs", 81 deps = ["//pkg/bitmap"], 82 )