Skip to content

Commit 7a0aa25

Browse files
call osyield directly
1 parent a1a67e6 commit 7a0aa25

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/runtime/proc.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,8 +1678,7 @@ func lockextra(nilokay bool) *m {
16781678
for {
16791679
old := atomic.Loaduintptr(&extram)
16801680
if old == locked {
1681-
yield := osyield
1682-
yield()
1681+
osyield()
16831682
continue
16841683
}
16851684
if old == 0 && !nilokay {
@@ -1696,8 +1695,7 @@ func lockextra(nilokay bool) *m {
16961695
if atomic.Casuintptr(&extram, old, locked) {
16971696
return (*m)(unsafe.Pointer(old))
16981697
}
1699-
yield := osyield
1700-
yield()
1698+
osyield()
17011699
continue
17021700
}
17031701
}

0 commit comments

Comments
 (0)