summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pkg/runtime/proc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 0fef16aa6..a587a7fd4 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -551,15 +551,15 @@ void
·entersyscall(void)
{
lock(&sched);
+ // Leave SP around for gc and traceback.
+ // Do before notewakeup so that gc
+ // never sees Gsyscall with wrong stack.
+ gosave(&g->sched);
if(sched.predawn) {
unlock(&sched);
return;
}
g->status = Gsyscall;
- // Leave SP around for gc and traceback.
- // Do before notewakeup so that gc
- // never sees Gsyscall with wrong stack.
- gosave(&g->sched);
sched.mcpu--;
sched.msyscall++;
if(sched.gwait != 0)