]> Cypherpunks repositories - gostls13.git/commit
runtime: replace scanblock(0, 0, nil, nil) with drainworkbuf
authorAustin Clements <austin@google.com>
Thu, 12 Feb 2015 20:05:55 +0000 (15:05 -0500)
committerAustin Clements <austin@google.com>
Fri, 13 Feb 2015 15:34:24 +0000 (15:34 +0000)
commitcf964e1653489d99b68a0668d293b6b521e5ab62
treec911d0bb0bbfba55c86250e21be2f73490e2ab06
parentc2de2f87f08c6ebdae095a84dd8c2c8c5ecfc671
runtime: replace scanblock(0, 0, nil, nil) with drainworkbuf

scanblock(0, 0, nil, nil) was just a confusing way of saying

  wbuf = getpartialorempty()
  drainworkbuf(wbuf, true)

Make drainworkbuf accept a nil workbuf and perform the
getpartialorempty itself and replace all uses of scanblock(0, 0, nil,
nil) with direct calls to drainworkbuf(nil, true).

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