detect and report a case of deadlock
This commit is contained in:
parent
8ac21c745f
commit
3e3ed33cbf
|
@ -657,15 +657,11 @@ int scheme_wait_semas_chs(int n, Scheme_Object **o, int just_try, Syncing *synci
|
|||
}
|
||||
|
||||
if (ii >= n) {
|
||||
if (!scheme_current_thread->next)
|
||||
if (!scheme_wait_until_suspend_ok()) {
|
||||
break;
|
||||
else {
|
||||
if (!scheme_wait_until_suspend_ok()) {
|
||||
break;
|
||||
} else {
|
||||
/* there may have been some action on one of the waitables;
|
||||
try again */
|
||||
}
|
||||
} else {
|
||||
/* there may have been some action on one of the waitables;
|
||||
try again */
|
||||
}
|
||||
} else
|
||||
break;
|
||||
|
|
|
@ -4641,6 +4641,11 @@ int scheme_wait_until_suspend_ok(void)
|
|||
--atomic_timeout_auto_suspend;
|
||||
}
|
||||
|
||||
if (do_atomic) {
|
||||
scheme_log_abort("about to suspend in atomic mode");
|
||||
abort();
|
||||
}
|
||||
|
||||
return did;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user