mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: remove unused return value from lfstackUnpack
None of the two places that call lfstackUnpack use the second argument.
This simplifies a followup CL that merges the lfstack{Pack,Unpack}
implementations.
Change-Id: I3c93f6259da99e113d94f8c8027584da79c1ac2c
Reviewed-on: https://go-review.googlesource.com/21595
Run-TryBot: Dave Cheney <dave@cheney.net>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
04945edd40
commit
0c81248bf4
4 changed files with 8 additions and 14 deletions
|
|
@ -15,7 +15,7 @@ import (
|
|||
func lfstackpush(head *uint64, node *lfnode) {
|
||||
node.pushcnt++
|
||||
new := lfstackPack(node, node.pushcnt)
|
||||
if node1, _ := lfstackUnpack(new); node1 != node {
|
||||
if node1 := lfstackUnpack(new); node1 != node {
|
||||
print("runtime: lfstackpush invalid packing: node=", node, " cnt=", hex(node.pushcnt), " packed=", hex(new), " -> node=", node1, "\n")
|
||||
throw("lfstackpush")
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ func lfstackpop(head *uint64) unsafe.Pointer {
|
|||
if old == 0 {
|
||||
return nil
|
||||
}
|
||||
node, _ := lfstackUnpack(old)
|
||||
node := lfstackUnpack(old)
|
||||
next := atomic.Load64(&node.next)
|
||||
if atomic.Cas64(head, old, next) {
|
||||
return unsafe.Pointer(node)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue