// for this lock, chained through m->nextwaitm.
// Queue this M.
for {
- gp.m.nextwaitm = v &^ locked
+ gp.m.nextwaitm = muintptr(v &^ locked)
if atomic.Casuintptr(&l.key, v, uintptr(unsafe.Pointer(gp.m))|locked) {
break
}
} else {
// Other M's are waiting for the lock.
// Dequeue an M.
- mp = (*m)(unsafe.Pointer(v &^ locked))
- if atomic.Casuintptr(&l.key, v, mp.nextwaitm) {
+ mp = muintptr(v &^ locked).ptr()
+ if atomic.Casuintptr(&l.key, v, uintptr(mp.nextwaitm)) {
// Dequeued an M. Wake it.
semawakeup(mp)
break
fflag uint32 // floating point compare flags
lockedExt uint32 // tracking for external LockOSThread
lockedInt uint32 // tracking for internal lockOSThread
- nextwaitm uintptr // next m waiting for lock
+ nextwaitm muintptr // next m waiting for lock
waitunlockf unsafe.Pointer // todo go func(*g, unsafe.pointer) bool
waitlock unsafe.Pointer
waittraceev byte