Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1440)

Unified Diff: src/pkg/runtime/proc.c

Issue 74790043: code review 74790043: runtime: use VEH, not SEH, for windows/386 exception ha... (Closed)
Patch Set: diff -r f60620ad71fa https://code.google.com/p/go/ Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pkg/runtime/proc.c
===================================================================
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -599,13 +599,6 @@
void
runtime·mstart(void)
{
-#ifdef GOOSARCH_windows_386
- // It is used by windows-386 only. Unfortunately, seh needs
- // to be located on os stack, and mstart runs on os stack
- // for both m0 and m.
- SEH seh;
-#endif
-
if(g != m->g0)
runtime·throw("bad runtime·mstart");
@@ -615,9 +608,6 @@
runtime·gosave(&m->g0->sched);
m->g0->sched.pc = (uintptr)-1; // make sure it is never used
m->g0->stackguard = m->g0->stackguard0; // cgo sets only stackguard0, copy it to stackguard
-#ifdef GOOSARCH_windows_386
- m->seh = &seh;
-#endif
runtime·asminit();
runtime·minit();
@@ -769,14 +759,6 @@
g->stackguard = (uintptr)(&x - 32*1024);
g->stackguard0 = g->stackguard;
-#ifdef GOOSARCH_windows_386
- // On windows/386, we need to put an SEH frame (two words)
- // somewhere on the current stack. We are called from cgocallback_gofunc
- // and we know that it will leave two unused words below m->curg->sched.sp.
- // Use those.
- m->seh = (SEH*)((uintptr*)&x + 1);
-#endif
-
// Initialize this thread to use the m.
runtime·asminit();
runtime·minit();
@@ -854,10 +836,6 @@
// Undo whatever initialization minit did during needm.
runtime·unminit();
-#ifdef GOOSARCH_windows_386
- m->seh = nil; // reset dangling typed pointer
-#endif
-
// Clear m and g, and return m to the extra list.
// After the call to setmg we can only call nosplit functions.
mp = m;

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b