esac
) || exit $?
-case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED" in
+ # Race detector only supported on Linux, FreeBSD and OS X,
+ # and only on amd64, and only when cgo is enabled.
+ # Delayed until here so we know whether to try external linking.
++# DISABLED until we get garbage collection working.
++case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED-XXX-DISABLED" in
+ linux-linux-amd64-1 | freebsd-freebsd-amd64-1 | darwin-darwin-amd64-1)
+ echo
+ echo '# Testing race detector.'
+ go test -race -i runtime/race flag os/exec
+ go test -race -run=Output runtime/race
+ go test -race -short flag os/exec
+
+ # Test with external linking; see issue 9133.
+ if [ "$extlink" = 1 ]; then
+ go test -race -short -ldflags=-linkmode=external flag os/exec
+ fi
+ esac
+
# This tests cgo -cdefs. That mode is not supported,
# so it's okay if it doesn't work on some systems.
# In particular, it works badly with clang on OS X.
MOVD R0, R0 // NOP
BL runtime·goexit1(SB) // does not return
+ TEXT runtime·getg(SB),NOSPLIT,$-8-8
+ MOVD g, ret+0(FP)
+ RETURN
++
+TEXT runtime·prefetcht0(SB),NOSPLIT,$0-8
+ RETURN
+
+TEXT runtime·prefetcht1(SB),NOSPLIT,$0-8
+ RETURN
+
+TEXT runtime·prefetcht2(SB),NOSPLIT,$0-8
+ RETURN
+
+TEXT runtime·prefetchnta(SB),NOSPLIT,$0-8
+ RETURN
func lfstackpush(head *uint64, node *lfnode) {
node.pushcnt++
new := lfstackPack(node, node.pushcnt)
+ if node1, _ := lfstackUnpack(new); node1 != node {
+ println("runtime: lfstackpush invalid packing: node=", node, " cnt=", hex(node.pushcnt), " packed=", hex(new), " -> node=", node1, "\n")
+ gothrow("lfstackpush")
+ }
for {
old := atomicload64(head)
- node.next, _ = lfstackUnpack(old)
+ node.next = old
if cas64(head, old, new) {
break
}
fun [0]uintptr
}
- const (
- // TODO: Generate in cmd/dist.
- _NaCl = 0
- _Windows = 0
- _Solaris = 0
- _Plan9 = 0
- )
-
// Lock-free stack node.
+// // Also known to export_test.go.
type lfnode struct {
- next *lfnode
+ next uint64
pushcnt uintptr
}
if gp.syscallsp != 0 {
return
}
- if _Windows != 0 && gp.m != nil && gp.m.libcallsp != 0 {
-
- /* TODO
- if goos_windows && gp.m != nil && gp.m.libcallsp != 0 {
++ if goos_windows != 0 && gp.m != nil && gp.m.libcallsp != 0 {
return
}
- */
if stackDebug > 0 {
print("shrinking stack ", oldsize, "->", newsize, "\n")