diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-12-02 12:50:33 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-12-02 15:12:13 -0800 |
| commit | 381de776c4878dd9af76b126cfa37bc80cad363f (patch) | |
| tree | c3ddcbf9613db3074c9c6882bb757357cf5bdd0a /net/netmon | |
| parent | b8c58ca7c1a49fb772d095c65693cdab06488047 (diff) | |
| download | tailscale-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/netmon')
| -rw-r--r-- | net/netmon/interfaces_darwin.go | 5 | ||||
| -rw-r--r-- | net/netmon/netmon.go | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/net/netmon/interfaces_darwin.go b/net/netmon/interfaces_darwin.go index 126040350..757d8697a 100644 --- a/net/netmon/interfaces_darwin.go +++ b/net/netmon/interfaces_darwin.go @@ -30,6 +30,11 @@ var ifNames struct { m map[int]string // ifindex => name } +var _ = func() bool { + syncs.RegisterMutex(&ifNames.Mutex, "netmon.ifNames.Mutex") + return true +}() + func init() { interfaceDebugExtras = interfaceDebugExtrasDarwin } diff --git a/net/netmon/netmon.go b/net/netmon/netmon.go index 657da04d5..a9b7f756a 100644 --- a/net/netmon/netmon.go +++ b/net/netmon/netmon.go @@ -125,6 +125,7 @@ func New(bus *eventbus.Bus, logf logger.Logf) (*Monitor, error) { stop: make(chan struct{}), lastWall: wallTime(), } + syncs.RegisterMutex(&m.mu, "netmon.Monitor.mu") m.changed = eventbus.Publish[ChangeDelta](m.b) st, err := m.interfaceStateUncached() if err != nil { |
