summaryrefslogtreecommitdiff
path: root/src/cmd/dist/buildruntime.c
diff options
context:
space:
mode:
authorAkshat Kumar <seed@mail.nanosouffle.net>2013-01-30 02:53:56 -0800
committerAkshat Kumar <seed@mail.nanosouffle.net>2013-01-30 02:53:56 -0800
commite9b6b2104e0e56783d08dd82ceb0d2b2c1859cb9 (patch)
treedb2b169d396281a8203a2ec654583c4c9028f9b0 /src/cmd/dist/buildruntime.c
parent56ed4256069e233e18a75da36136a4c2ac624801 (diff)
downloadgo-e9b6b2104e0e56783d08dd82ceb0d2b2c1859cb9.tar.gz
runtime: add support for panic/recover in Plan 9 note handler
This change also resolves some issues with note handling: we now make sure that there is enough room at the bottom of every goroutine to execute the note handler, and the `exitstatus' is no longer a global entity, which resolves some race conditions. R=rminnich, npe, rsc, ality CC=golang-dev https://codereview.appspot.com/6569068 Committer: Anthony Martin <ality@pbrane.org>
Diffstat (limited to 'src/cmd/dist/buildruntime.c')
-rw-r--r--src/cmd/dist/buildruntime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/dist/buildruntime.c b/src/cmd/dist/buildruntime.c
index 52a69be0f..6c07e2a48 100644
--- a/src/cmd/dist/buildruntime.c
+++ b/src/cmd/dist/buildruntime.c
@@ -105,9 +105,15 @@ static struct {
"#define m(r) 4(r)\n"
},
{"386", "plan9",
+ "// Plan 9 does not have per-process segment descriptors with\n"
+ "// which to do thread-local storage. Instead, we will use a\n"
+ "// fixed offset from the per-process TOS struct address for\n"
+ "// the local storage. Since the process ID is contained in the\n"
+ "// TOS struct, we specify an offset for that here as well.\n"
"#define get_tls(r) MOVL _tos(SB), r \n"
"#define g(r) -8(r)\n"
"#define m(r) -4(r)\n"
+ "#define procid(r) 48(r)\n"
},
{"386", "linux",
"// On Linux systems, what we call 0(GS) and 4(GS) for g and m\n"