mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-13 00:59:55 +00:00
21 lines
386 B
Go
21 lines
386 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !ts_omit_ctxlock_checks
|
|
|
|
package ctxlock
|
|
|
|
const useCheckedImpl = true
|
|
|
|
type (
|
|
stateImpl = *checked
|
|
lockState = lockCallers
|
|
_ = lockState
|
|
)
|
|
|
|
var fromContext = fromContextChecked
|
|
|
|
func lock[R Rank](parent stateImpl, mu *checkedMutex[R]) stateImpl {
|
|
return lockChecked(parent, mu)
|
|
}
|