tailscale/util/ctxlock/state_use_unchecked.go
Nick Khyl e744ea41c9
util/ctxlock: enforce mutex lock ordering defined by its rank
Updates #12614

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2025-05-04 23:15:41 -05:00

21 lines
391 B
Go

// 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)
}