github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/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(licenses = ["notice"]) 5 6 go_template_instance( 7 name = "waiter_list", 8 out = "waiter_list.go", 9 package = "semaphore", 10 prefix = "waiter", 11 template = "//pkg/ilist:generic_list", 12 types = { 13 "Element": "*waiter", 14 "Linker": "*waiter", 15 }, 16 ) 17 18 go_library( 19 name = "semaphore", 20 srcs = [ 21 "semaphore.go", 22 "waiter_list.go", 23 ], 24 visibility = ["//pkg/sentry:internal"], 25 deps = [ 26 "//pkg/abi/linux", 27 "//pkg/context", 28 "//pkg/errors/linuxerr", 29 "//pkg/log", 30 "//pkg/sentry/fs", 31 "//pkg/sentry/kernel/auth", 32 "//pkg/sentry/kernel/time", 33 "//pkg/sync", 34 "//pkg/syserror", 35 ], 36 ) 37 38 go_test( 39 name = "semaphore_test", 40 size = "small", 41 srcs = ["semaphore_test.go"], 42 library = ":semaphore", 43 deps = [ 44 "//pkg/abi/linux", 45 "//pkg/context", 46 "//pkg/sentry/contexttest", 47 "//pkg/sentry/kernel/auth", 48 "//pkg/syserror", 49 ], 50 )