mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: change p.runq from []*g to []guintptr
This eliminates many write barriers in the scheduler code that are unnecessary and will interfere with upcoming changes where the garbage collector will have to invoke run queue functions in contexts that must not have write barriers. Change-Id: I702d0ac99cfd00ffff406e7362917db6a43e7e55 Reviewed-on: https://go-review.googlesource.com/16556 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Austin Clements <austin@google.com>
This commit is contained in:
parent
48155f5440
commit
0ca4488cc1
2 changed files with 8 additions and 8 deletions
|
|
@ -358,7 +358,7 @@ type p struct {
|
|||
// Queue of runnable goroutines. Accessed without lock.
|
||||
runqhead uint32
|
||||
runqtail uint32
|
||||
runq [256]*g
|
||||
runq [256]guintptr
|
||||
// runnext, if non-nil, is a runnable G that was ready'd by
|
||||
// the current G and should be run next instead of what's in
|
||||
// runq if there's time remaining in the running G's time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue