Skip to content

Commit

Permalink
runtime: fix a comment typo in runqget()
Browse files Browse the repository at this point in the history
Change-Id: I79695e1cfda3b4cd911673f6e14dc316c451e2ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/423436
Reviewed-by: Michael Knyszek <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
Run-TryBot: Michael Knyszek <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
  • Loading branch information
panjf2000 authored and prattmic committed Aug 12, 2022
1 parent ea9c3fd commit 2f6783c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5992,7 +5992,7 @@ func runqget(pp *p) (gp *g, inheritTime bool) {
next := pp.runnext
// If the runnext is non-0 and the CAS fails, it could only have been stolen by another P,
// because other Ps can race to set runnext to 0, but only the current P can set it to non-0.
// Hence, there's no need to retry this CAS if it falls.
// Hence, there's no need to retry this CAS if it fails.
if next != 0 && pp.runnext.cas(next, 0) {
return next.ptr(), true
}
Expand Down

0 comments on commit 2f6783c

Please sign in to comment.