aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-06-29 17:14:18 +0200
committerRickard Green <[email protected]>2016-06-29 17:14:18 +0200
commit6e9af06b17476cb680fbc33ae47dff173ea24204 (patch)
treec7d0eb1496078762a3195eeee9524f149500af66 /erts/emulator/beam
parent3b7a6ffddc819bf305353a593904cea9e932e7dc (diff)
downloadotp-6e9af06b17476cb680fbc33ae47dff173ea24204.tar.gz
otp-6e9af06b17476cb680fbc33ae47dff173ea24204.tar.bz2
otp-6e9af06b17476cb680fbc33ae47dff173ea24204.zip
Fix group_leader/2
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/bif.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index fc14061a44..d9048065c8 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -4305,8 +4305,9 @@ BIF_RETTYPE group_leader_2(BIF_ALIST_2)
else {
locks &= ~ERTS_PROC_LOCK_STATUS;
erts_smp_proc_unlock(new_member, ERTS_PROC_LOCK_STATUS);
- if (erts_smp_atomic32_read_nob(&new_member->state)
- & !(ERTS_PSFLG_DIRTY_RUNNING|ERTS_PSFLG_DIRTY_RUNNING_SYS)) {
+ if (new_member == BIF_P
+ || !(erts_smp_atomic32_read_nob(&new_member->state)
+ & (ERTS_PSFLG_DIRTY_RUNNING|ERTS_PSFLG_DIRTY_RUNNING_SYS))) {
new_member->group_leader = STORE_NC_IN_PROC(new_member,
BIF_ARG_1);
}
@@ -4326,6 +4327,7 @@ BIF_RETTYPE group_leader_2(BIF_ALIST_2)
BIF_ARG_1);
bp->next = new_member->mbuf;
new_member->mbuf = bp;
+ new_member->mbuf_sz += bp->used_size;
}
}
}