diff options
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 387841e60b..f84cb51bad 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -554,10 +554,13 @@ type m struct { syscalltick uint32 freelink *m // on sched.freem - // mFixup is used to synchronize OS related m state (credentials etc) - // use mutex to access. + // mFixup is used to synchronize OS related m state + // (credentials etc) use mutex to access. To avoid deadlocks + // an atomic.Load() of used being zero in mDoFixupFn() + // guarantees fn is nil. mFixup struct { lock mutex + used uint32 fn func(bool) bool } |
