aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime.h
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-07-12 11:30:53 -0700
committerRob Pike <r@golang.org>2008-07-12 11:30:53 -0700
commit2da9783e2b79f0c9a05087ba014bb93d03e191ea (patch)
tree49d2daa2c96b564d67b42b864f3364000eafd9d0 /src/runtime/runtime.h
parent5a81d1f29fad531a639379f78d0049638449b603 (diff)
downloadgo-2da9783e2b79f0c9a05087ba014bb93d03e191ea.tar.xz
preserve AX across stack jump so C routines return correct value when triggering morestack.
SVN=126935
Diffstat (limited to 'src/runtime/runtime.h')
-rw-r--r--src/runtime/runtime.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index f7d31a1dd8..3a2e3bde9e 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -82,6 +82,7 @@ struct M
{
G* g0; // g0 w interrupt stack - must not move
uint64 morearg; // arg to morestack - must not move
+ uint64 cret; // return value from C - must not move
G* curg; // current running goroutine
Gobuf sched;
Gobuf morestack;
@@ -148,6 +149,8 @@ extern int32 debug;
*/
int32 gogo(Gobuf*);
int32 gosave(Gobuf*);
+int32 gogoret(Gobuf*, uint64);
+void retfromnewstack(void);
void setspgoto(byte*, void(*)(void), void(*)(void));
void FLUSH(void*);
void* getu(void);