aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/proc.c')
-rw-r--r--libgo/runtime/proc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 3e3437e6a47..e591824b140 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -375,6 +375,8 @@ bool runtime_isarchive;
extern void kickoff(void)
__asm__(GOSYM_PREFIX "runtime.kickoff");
+extern void minit(void)
+ __asm__(GOSYM_PREFIX "runtime.minit");
extern void mstart1(void)
__asm__(GOSYM_PREFIX "runtime.mstart1");
extern void stopm(void)
@@ -476,6 +478,10 @@ runtime_mstart(void *arg)
gp->entry = nil;
gp->param = nil;
+ // We have to call minit before we call getcontext,
+ // because getcontext will copy the signal mask.
+ minit();
+
initcontext();
// Record top of stack for use by mcall.