]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove a few unused params and results
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 9 Oct 2017 09:54:22 +0000 (10:54 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 9 Oct 2017 20:14:50 +0000 (20:14 +0000)
These have never had a use - not even going back to when they were added
in C.

Change-Id: I143b6902b3bacb1fa83c56c9070a8adb9f61a844
Reviewed-on: https://go-review.googlesource.com/69119
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/mcache.go
src/runtime/mgclarge.go
src/runtime/proc.go

index 96fb273337ad1d749ce5a51ac8d47cec367edcf8..6c24650dac24b6db474ac194d576f333417f2eb3 100644 (file)
@@ -104,7 +104,7 @@ func freemcache(c *mcache) {
 
 // Gets a span that has a free object in it and assigns it
 // to be the cached span for the given sizeclass. Returns this span.
-func (c *mcache) refill(spc spanClass) *mspan {
+func (c *mcache) refill(spc spanClass) {
        _g_ := getg()
 
        _g_.m.locks++
@@ -131,7 +131,6 @@ func (c *mcache) refill(spc spanClass) *mspan {
 
        c.alloc[spc] = s
        _g_.m.locks--
-       return s
 }
 
 func (c *mcache) releaseAll() {
index 757e88d1d9da6ff6ca435c5cba15dd3603cf5af8..fe437bf5e84d7448ecc94d09da0b7c33df8520eb 100644 (file)
@@ -164,11 +164,10 @@ func (root *mTreap) insert(span *mspan) {
        }
 }
 
-func (root *mTreap) removeNode(t *treapNode) *mspan {
+func (root *mTreap) removeNode(t *treapNode) {
        if t.spanKey.npages != t.npagesKey {
                throw("span and treap node npages do not match")
        }
-       result := t.spanKey
 
        // Rotate t down to be leaf of tree for removal, respecting priorities.
        for t.right != nil || t.left != nil {
@@ -192,7 +191,6 @@ func (root *mTreap) removeNode(t *treapNode) *mspan {
        t.spanKey = nil
        t.npagesKey = 0
        mheap_.treapalloc.free(unsafe.Pointer(t))
-       return result
 }
 
 // remove searches for, finds, removes from the treap, and returns the smallest
index c24589fd4fc4ffbfbf513ff6095e56e5a34d0681..d83177fc1fd5b4950211a191d39e8faeba3e8def 100644 (file)
@@ -2936,15 +2936,14 @@ func newproc(siz int32, fn *funcval) {
        argp := add(unsafe.Pointer(&fn), sys.PtrSize)
        pc := getcallerpc()
        systemstack(func() {
-               newproc1(fn, (*uint8)(argp), siz, 0, pc)
+               newproc1(fn, (*uint8)(argp), siz, pc)
        })
 }
 
 // Create a new g running fn with narg bytes of arguments starting
-// at argp and returning nret bytes of results.  callerpc is the
-// address of the go statement that created this. The new g is put
-// on the queue of g's waiting to run.
-func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr) *g {
+// at argp. callerpc is the address of the go statement that created
+// this. The new g is put on the queue of g's waiting to run.
+func newproc1(fn *funcval, argp *uint8, narg int32, callerpc uintptr) {
        _g_ := getg()
 
        if fn == nil {
@@ -2952,7 +2951,7 @@ func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr
                throw("go of nil func value")
        }
        _g_.m.locks++ // disable preemption because it can be holding p in a local var
-       siz := narg + nret
+       siz := narg
        siz = (siz + 7) &^ 7
 
        // We could allocate a larger initial stack if necessary.
@@ -3047,7 +3046,6 @@ func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr
        if _g_.m.locks == 0 && _g_.preempt { // restore the preemption request in case we've cleared it in newstack
                _g_.stackguard0 = stackPreempt
        }
-       return newg
 }
 
 // Put on gfree list.