summaryrefslogtreecommitdiff
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2019-10-29 15:42:57 +0100
committerLukas Larsson <lukas@erlang.org>2019-11-04 15:45:58 +0100
commitd1c222fbf9f09d59ee9f26f906d89e8493a9b548 (patch)
treee5564b986e9f52dfe30df2710e723a08734960a9 /erts/emulator/hipe
parentf6ddf71b99c9b2fdf1c1a6726af9ef532d7151e4 (diff)
downloaderlang-d1c222fbf9f09d59ee9f26f906d89e8493a9b548.tar.gz
erts: Move signal queue flags to own flag field in queue struct
We need to make space for more flags so we move all the flags that have something to do with the signal queue to a seperate flag field.
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c10
-rw-r--r--erts/emulator/hipe/hipe_native_bif.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index 052cf9c263..1cc25a3cf0 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -490,20 +490,20 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[])
/* same semantics, different debug trace messages */
/* XXX: BEAM has different entries for the locked and unlocked
cases. HiPE doesn't, so we must check dynamically. */
- if (p->flags & F_HIPE_RECV_LOCKED)
- p->flags &= ~F_HIPE_RECV_LOCKED;
+ if (p->sig_qs.flags & FS_HIPE_RECV_LOCKED)
+ p->sig_qs.flags &= ~FS_HIPE_RECV_LOCKED;
else
erts_proc_lock(p, ERTS_PROC_LOCKS_MSG_RECEIVE);
p->i = hipe_beam_pc_resume;
p->arity = 0;
if (erts_atomic32_read_nob(&p->state) & ERTS_PSFLG_EXITING)
ASSERT(erts_atomic32_read_nob(&p->state) & ERTS_PSFLG_ACTIVE);
- else if (!(p->flags & F_HIPE_RECV_YIELD))
+ else if (!(p->sig_qs.flags & FS_HIPE_RECV_YIELD))
erts_atomic32_read_band_relb(&p->state, ~ERTS_PSFLG_ACTIVE);
else {
/* Yielded from receive */
ERTS_VBUMP_ALL_REDS(p);
- p->flags &= ~F_HIPE_RECV_YIELD;
+ p->sig_qs.flags &= ~FS_HIPE_RECV_YIELD;
}
erts_proc_unlock(p, ERTS_PROC_LOCKS_MSG_RECEIVE);
do_schedule:
@@ -527,7 +527,7 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[])
p = erts_schedule(NULL, p, reds_in - p->fcalls);
ERTS_REQ_PROC_MAIN_LOCK(p);
ASSERT(!(p->flags & F_HIPE_MODE));
- p->flags &= ~F_HIPE_RECV_LOCKED;
+ p->sig_qs.flags &= ~FS_HIPE_RECV_LOCKED;
reg = p->scheduler_data->x_reg_array;
}
{
diff --git a/erts/emulator/hipe/hipe_native_bif.c b/erts/emulator/hipe/hipe_native_bif.c
index 80e5d81023..7eebc15b2c 100644
--- a/erts/emulator/hipe/hipe_native_bif.c
+++ b/erts/emulator/hipe/hipe_native_bif.c
@@ -144,8 +144,8 @@ BIF_RETTYPE nbif_impl_hipe_set_timeout(NBIF_ALIST_1)
else {
int tres = erts_set_proc_timer_term(p, timeout_value);
if (tres != 0) { /* Wrong time */
- if (p->flags & F_HIPE_RECV_LOCKED) {
- p->flags &= ~F_HIPE_RECV_LOCKED;
+ if (p->sig_qs.flags & FS_HIPE_RECV_LOCKED) {
+ p->sig_qs.flags &= ~FS_HIPE_RECV_LOCKED;
erts_proc_unlock(p, ERTS_PROC_LOCKS_MSG_RECEIVE);
}
BIF_ERROR(p, EXC_TIMEOUT_VALUE);
@@ -555,7 +555,7 @@ Eterm hipe_check_get_msg(Process *c_p)
if (!msgp) {
if (get_out) {
if (get_out < 0)
- c_p->flags |= F_HIPE_RECV_YIELD; /* yield... */
+ c_p->sig_qs.flags |= FS_HIPE_RECV_YIELD; /* yield... */
/* else: go exit... */
return THE_NON_VALUE;
}
@@ -568,7 +568,7 @@ Eterm hipe_check_get_msg(Process *c_p)
*/
/* XXX: BEAM doesn't need this */
- c_p->flags |= F_HIPE_RECV_LOCKED;
+ c_p->sig_qs.flags |= FS_HIPE_RECV_LOCKED;
c_p->flags &= ~F_DELAY_GC;
return THE_NON_VALUE;
}
@@ -613,8 +613,8 @@ void hipe_clear_timeout(Process *c_p)
*/
/* XXX: BEAM has different entries for the locked and unlocked
cases. HiPE doesn't, so we must check dynamically. */
- if (c_p->flags & F_HIPE_RECV_LOCKED) {
- c_p->flags &= ~F_HIPE_RECV_LOCKED;
+ if (c_p->sig_qs.flags & FS_HIPE_RECV_LOCKED) {
+ c_p->sig_qs.flags &= ~FS_HIPE_RECV_LOCKED;
erts_proc_unlock(c_p, ERTS_PROC_LOCKS_MSG_RECEIVE);
}
if (IS_TRACED_FL(c_p, F_TRACE_RECEIVE)) {