aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-06-01 19:24:27 +0200
committerRickard Green <[email protected]>2017-06-01 19:24:27 +0200
commitf4836a7883842f0e2ae20285ccedf9856c66b24a (patch)
treeeafce805b520d57ccfbe021356dbe330c70e2fd1 /erts/emulator/beam/erl_gc.c
parentd646221c59fbf57d5beac913248b46f5dbebfbe7 (diff)
downloadotp-f4836a7883842f0e2ae20285ccedf9856c66b24a.tar.gz
otp-f4836a7883842f0e2ae20285ccedf9856c66b24a.tar.bz2
otp-f4836a7883842f0e2ae20285ccedf9856c66b24a.zip
Fix check_process_code() on hibernated process
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 2f21111a2e..c22577a254 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -490,7 +490,7 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj)
esdp->gc_info.garbage_cols++;
esdp->gc_info.reclaimed += reclaimed_now;
- FLAGS(p) &= ~F_FORCE_GC;
+ FLAGS(p) &= ~(F_FORCE_GC|F_HIBERNATED);
#ifdef CHECK_FOR_HOLES
/*
@@ -658,6 +658,8 @@ erts_garbage_collect_hibernate(Process* p)
ErtsGcQuickSanityCheck(p);
+ p->flags |= F_HIBERNATED;
+
erts_smp_atomic32_read_band_nob(&p->state, ~ERTS_PSFLG_GC);
}
@@ -830,6 +832,7 @@ erts_garbage_collect_literals(Process* p, Eterm* literals,
/*
* Restore status.
*/
+ p->flags &= ~F_HIBERNATED;
erts_smp_atomic32_read_band_nob(&p->state, ~ERTS_PSFLG_GC);
}