summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/plan9/386
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
commitc072558b90f1bbedc2022b0f30c8b1ac4712538e (patch)
tree67767591619e4bd8111fb05fac185cde94fb7378 /src/pkg/runtime/plan9/386
parent5859517b767c99749a45651c15d4bae5520ebae8 (diff)
downloadgolang-upstream/2011.02.15.tar.gz
Imported Upstream version 2011.02.15upstream/2011.02.15
Diffstat (limited to 'src/pkg/runtime/plan9/386')
-rw-r--r--src/pkg/runtime/plan9/386/defs.h1
-rw-r--r--src/pkg/runtime/plan9/386/sys.s5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/runtime/plan9/386/defs.h b/src/pkg/runtime/plan9/386/defs.h
index 5df757613..58fd9d94d 100644
--- a/src/pkg/runtime/plan9/386/defs.h
+++ b/src/pkg/runtime/plan9/386/defs.h
@@ -1 +1,2 @@
// nothing to see here
+#define tos_pid 48
diff --git a/src/pkg/runtime/plan9/386/sys.s b/src/pkg/runtime/plan9/386/sys.s
index 867b8940f..f760b782f 100644
--- a/src/pkg/runtime/plan9/386/sys.s
+++ b/src/pkg/runtime/plan9/386/sys.s
@@ -58,9 +58,10 @@ TEXT runtime·rfork(SB),7,$0
MOVL BX, m(AX)
// Initialize AX from _tos->pid
- MOVL 0xdfffeff8, AX
+ MOVL _tos(SB), AX
+ MOVL tos_pid(AX), AX
MOVL AX, m_procid(BX) // save pid as m->procid
-
+
CALL runtime·stackcheck(SB) // smashes AX, CX
MOVL 0(DX), DX // paranoia; check they are not nil