aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2015-08-10 15:23:59 +0200
committerLukas Larsson <[email protected]>2015-08-10 15:23:59 +0200
commit8dc55fcbf7d81942781ebbe58bc7bfcf46b4c035 (patch)
tree8973779492c3eb55be1443420743a5c341329ccf
parentef50fce3ae60630b512225bc75ba786aaf1fce6c (diff)
parentde73ff17c737a24a322b260f75d69e61f3586328 (diff)
downloadotp-8dc55fcbf7d81942781ebbe58bc7bfcf46b4c035.tar.gz
otp-8dc55fcbf7d81942781ebbe58bc7bfcf46b4c035.tar.bz2
otp-8dc55fcbf7d81942781ebbe58bc7bfcf46b4c035.zip
Merge branch 'maint'
* maint: Teach smp VM how to deal with crash of a linked trace port
-rw-r--r--erts/emulator/beam/erl_process.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 0b4274f920..fc62581879 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -11446,10 +11446,14 @@ save_pending_exiter(Process *p)
{
ErtsProcList *plp;
ErtsRunQueue *rq;
+ ErtsSchedulerData *esdp = erts_get_scheduler_data();
ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p));
- rq = erts_get_runq_current(NULL);
+ if (!esdp)
+ rq = RUNQ_READ_RQ(&p->run_queue);
+ else
+ rq = esdp->run_queue;
plp = proclist_create(p);
@@ -11466,6 +11470,7 @@ save_pending_exiter(Process *p)
else
#endif
wake_scheduler(rq);
+
}
#endif
@@ -11654,23 +11659,21 @@ send_exit_signal(Process *c_p, /* current process if and only
if (need_locks
&& erts_smp_proc_trylock(rp, need_locks) == EBUSY) {
/* ... but we havn't got all locks on it ... */
- save_pending_exiter(rp);
+ save_pending_exiter(rp);
/*
* The pending exit will be discovered when next
* process is scheduled in
*/
- goto set_pending_exit;
- }
- else {
- /* ...and we have all locks on it... */
- *rp_locks = ERTS_PROC_LOCKS_ALL;
- set_proc_exiting(rp,
- state,
- (is_immed(rsn)
- ? rsn
- : copy_object(rsn, rp)),
- NULL);
+ goto set_pending_exit;
}
+ /* ...and we have all locks on it... */
+ *rp_locks = ERTS_PROC_LOCKS_ALL;
+ set_proc_exiting(rp,
+ state,
+ (is_immed(rsn)
+ ? rsn
+ : copy_object(rsn, rp)),
+ NULL);
}
else { /* Process running... */