diff options
author | Rickard Green <[email protected]> | 2012-08-03 15:06:21 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-08-03 15:06:21 +0200 |
commit | e76262ea8ac6986a497bb1e7fbf5e75668027473 (patch) | |
tree | 7128f0a39f6a996f7abd67e16fa3167bdc28e116 /erts/emulator/beam/bif.c | |
parent | ee51d735f05514a784d808be9604703d70561731 (diff) | |
parent | ff1a1e3c6f9a233b880e9d359a1c50e55d7c812f (diff) | |
download | otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.tar.gz otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.tar.bz2 otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.zip |
Merge branch 'rickard/proc-sched/OTP-9892'
* rickard/proc-sched/OTP-9892:
Read message queue lengths while having lock
Remove development debug code
Fix bug scheduling free processes
Conflicts:
erts/emulator/beam/erl_message.c
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 6943c8852c..66f4259d20 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -2051,18 +2051,11 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend) { rp_locks |= ERTS_PROC_LOCK_MAIN; #endif /* send to local process */ - erts_send_message(p, rp, &rp_locks, msg, 0); - if (!erts_use_sender_punish) + res = erts_send_message(p, rp, &rp_locks, msg, 0); + if (erts_use_sender_punish) + res *= 4; + else res = 0; - else { -#ifdef ERTS_SMP - res = rp->msg_inq.len*4; - if (ERTS_PROC_LOCK_MAIN & rp_locks) - res += rp->msg.len*4; -#else - res = rp->msg.len*4; -#endif - } erts_smp_proc_unlock(rp, p == rp ? (rp_locks & ~ERTS_PROC_LOCK_MAIN) |