syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging

Updates #17852

Change-Id: I477340fb8e40686870e981ade11cd61597c34a20
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-11-15 09:40:57 -08:00
committed by Brad Fitzpatrick
parent 3a41c0c585
commit 99b06eac49
55 changed files with 145 additions and 94 deletions
+3 -3
View File
@@ -247,7 +247,7 @@ type LocalBackend struct {
extHost *ExtensionHost
// The mutex protects the following elements.
mu sync.Mutex
mu syncs.Mutex
// currentNodeAtomic is the current node context. It is always non-nil.
// It must be re-created when [LocalBackend] switches to a different profile/node
@@ -329,14 +329,14 @@ type LocalBackend struct {
//
// tkaSyncLock MUST be taken before mu (or inversely, mu must not be held
// at the moment that tkaSyncLock is taken).
tkaSyncLock sync.Mutex
tkaSyncLock syncs.Mutex
clock tstime.Clock
// Last ClientVersion received in MapResponse, guarded by mu.
lastClientVersion *tailcfg.ClientVersion
// lastNotifiedDriveSharesMu guards lastNotifiedDriveShares
lastNotifiedDriveSharesMu sync.Mutex
lastNotifiedDriveSharesMu syncs.Mutex
// lastNotifiedDriveShares keeps track of the last set of shares that we
// notified about.