]> Cypherpunks repositories - gostls13.git/commit
runtime: factor checking if P run queue is empty
authorAustin Clements <austin@google.com>
Wed, 22 Apr 2015 16:18:01 +0000 (12:18 -0400)
committerAustin Clements <austin@google.com>
Fri, 24 Apr 2015 15:12:42 +0000 (15:12 +0000)
commite5e52f4f2c6f67e41b97fd539c1963f85536c985
tree02ae2dd6a1c79fdaeb93a21d809ed5f3b842db30
parent9406f68e6afd02fd588e8ca05ebb729a4f4b8d0d
runtime: factor checking if P run queue is empty

There are a variety of places where we check if a P's run queue is
empty. This test is about to get slightly more complicated, so factor
it out into a new function, runqempty. This function is inlinable, so
this has no effect on performance.

Change-Id: If4a0b01ffbd004937de90d8d686f6ded4aad2c6b
Reviewed-on: https://go-review.googlesource.com/9287
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/proc1.go