summaryrefslogtreecommitdiffhomepage
path: root/net/dns/manager.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2025-12-02 12:50:33 -0800
committerBrad Fitzpatrick <bradfitz@tailscale.com>2025-12-02 15:12:13 -0800
commit381de776c4878dd9af76b126cfa37bc80cad363f (patch)
treec3ddcbf9613db3074c9c6882bb757357cf5bdd0a /net/dns/manager.go
parentb8c58ca7c1a49fb772d095c65693cdab06488047 (diff)
downloadtailscale-bradfitz/mutex_debug.tar.xz
tailscale-bradfitz/mutex_debug.zip
syncs: start working on mutex debugging, registrationbradfitz/mutex_debug
Updates #17852 Change-Id: Ib1b634eedd30cc4006bc1b39aa8d479d37c5f1f2 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'net/dns/manager.go')
-rw-r--r--net/dns/manager.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dns/manager.go b/net/dns/manager.go
index de99fe646..5170d0b78 100644
--- a/net/dns/manager.go
+++ b/net/dns/manager.go
@@ -15,7 +15,6 @@ import (
"runtime"
"slices"
"strings"
- "sync"
"sync/atomic"
"time"
@@ -65,8 +64,8 @@ type Manager struct {
knobs *controlknobs.Knobs // or nil
goos string // if empty, gets set to runtime.GOOS
- mu sync.Mutex // guards following
- config *Config // Tracks the last viable DNS configuration set by Set. nil on failures other than compilation failures or if set has never been called.
+ mu syncs.Mutex // guards following
+ config *Config // Tracks the last viable DNS configuration set by Set. nil on failures other than compilation failures or if set has never been called.
}
// NewManagers created a new manager from the given config.
@@ -95,6 +94,7 @@ func NewManager(logf logger.Logf, oscfg OSConfigurator, health *health.Tracker,
knobs: knobs,
goos: goos,
}
+ syncs.RegisterMutex(&m.mu, "dns.Manager.mu")
m.ctx, m.ctxCancel = context.WithCancel(context.Background())
m.logf("using %T", m.os)