Skip to content

Commit

Permalink
call osyield directly
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchaindevsh committed Dec 11, 2019
1 parent a1a67e6 commit 7a0aa25
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/runtime/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1678,8 +1678,7 @@ func lockextra(nilokay bool) *m {
for {
old := atomic.Loaduintptr(&extram)
if old == locked {
yield := osyield
yield()
osyield()
continue
}
if old == 0 && !nilokay {
Expand All @@ -1696,8 +1695,7 @@ func lockextra(nilokay bool) *m {
if atomic.Casuintptr(&extram, old, locked) {
return (*m)(unsafe.Pointer(old))
}
yield := osyield
yield()
osyield()
continue
}
}
Expand Down

0 comments on commit 7a0aa25

Please sign in to comment.