aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_mode_switch.c
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-08 15:17:28 +0200
committerHenrik Nord <[email protected]>2011-08-08 15:17:34 +0200
commitc6c4fba873c52d750e13fd335e008f3b44fb6826 (patch)
tree3a3b34858ef5fbb0119f76a76c0f7df8a0b17b9d /erts/emulator/hipe/hipe_mode_switch.c
parent44a70b59a1903265a33ccefa3846e10b3f86eb5d (diff)
parent614c92088cb947a8849ab4681458b233d2151f40 (diff)
downloadotp-c6c4fba873c52d750e13fd335e008f3b44fb6826.tar.gz
otp-c6c4fba873c52d750e13fd335e008f3b44fb6826.tar.bz2
otp-c6c4fba873c52d750e13fd335e008f3b44fb6826.zip
Merge branch 'pg/fix-hibernate-scheduling-with-hipe' into dev
* pg/fix-hibernate-scheduling-with-hipe: Fix bug related to hibernate and HiPE (clear F_HIBERNATE_SCHED flag) OTP-9452
Diffstat (limited to 'erts/emulator/hipe/hipe_mode_switch.c')
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index 16f8fb1347..e3e8367b62 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -346,7 +346,12 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[])
p->arity = callee_arity;
}
- /* If process is in P_WAITING state, we schedule the next process */
+ /* Schedule next process if current process was hibernated or is waiting
+ for messages */
+ if (p->flags & F_HIBERNATE_SCHED) {
+ p->flags &= ~F_HIBERNATE_SCHED;
+ goto do_schedule;
+ }
if (p->status == P_WAITING) {
goto do_schedule;
}