]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.garbage] runtime: fix TestLFStack on 386
authorRuss Cox <rsc@golang.org>
Mon, 27 Oct 2014 19:57:07 +0000 (15:57 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 27 Oct 2014 19:57:07 +0000 (15:57 -0400)
LGTM=rlh
R=rlh, dvyukov
CC=golang-codereviews
https://golang.org/cl/157430044

src/runtime/export_test.go
src/runtime/lfstack_test.go
src/runtime/runtime.h

index be352557fbd17b531622b05e748c5c8692493988..65e918e846650bbf5b1b45cbeccf48596787a13c 100644 (file)
@@ -26,7 +26,7 @@ var Exitsyscall = exitsyscall
 var LockedOSThread = lockedOSThread
 
 type LFNode struct {
-       Next    *LFNode
+       Next    uint64
        Pushcnt uintptr
 }
 
index e51877704538b6b3ff020937be25943661bd1ba4..68f221d6ef85116be7aa60d8d7cd8b25c39049a2 100644 (file)
@@ -121,7 +121,7 @@ func TestLFStackStress(t *testing.T) {
                        }
                        cnt++
                        sum2 += node.data
-                       node.Next = nil
+                       node.Next = 0
                }
        }
        if cnt != K {
index cbbf6b3fc032c1a0c2d8a53e07abec1892627ee9..c1bba423a15798d41a359b5783a57ff4a49380e5 100644 (file)
@@ -571,6 +571,7 @@ enum {
 #endif
 
 // Lock-free stack node.
+// Also known to export_test.go.
 struct LFNode
 {
        uint64  next;