summaryrefslogtreecommitdiffhomepage
path: root/util/ctxlock/state_use_unchecked.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/ctxlock/state_use_unchecked.go')
-rw-r--r--util/ctxlock/state_use_unchecked.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/util/ctxlock/state_use_unchecked.go b/util/ctxlock/state_use_unchecked.go
new file mode 100644
index 000000000..06e087d3d
--- /dev/null
+++ b/util/ctxlock/state_use_unchecked.go
@@ -0,0 +1,20 @@
+// Copyright (c) Tailscale Inc & AUTHORS
+// SPDX-License-Identifier: BSD-3-Clause
+
+//go:build ts_omit_ctxlock_checks
+
+package ctxlock
+
+const useCheckedImpl = false
+
+type (
+ stateImpl = unchecked
+ lockState = unchecked
+ _ = lockState
+)
+
+var fromContext = fromContextUnchecked
+
+func lock[R Rank](parent stateImpl, mu *uncheckedMutex[R]) stateImpl {
+ return lockUnchecked(parent, mu)
+}