diff options
Diffstat (limited to 'src/runtime/os_windows.go')
| -rw-r--r-- | src/runtime/os_windows.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index 567c567000..34d0627fcb 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -277,13 +277,11 @@ func monitorSuspendResume() { return // Running on Windows 7, where we don't need it anyway. } var fn interface{} = func(context uintptr, changeType uint32, setting uintptr) uintptr { - lock(&allglock) - for _, gp := range allgs { - if gp.m != nil && gp.m.resumesema != 0 { - stdcall1(_SetEvent, gp.m.resumesema) + for mp := (*m)(atomic.Loadp(unsafe.Pointer(&allm))); mp != nil; mp = mp.alllink { + if mp.resumesema != 0 { + stdcall1(_SetEvent, mp.resumesema) } } - unlock(&allglock) return 0 } params := _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS{ |
