}
ASSERT(get_itbl(t)->type == TSO);
- if (t->what_next == ThreadRelocated) {
- next = t->_link;
- *prev = next;
- continue;
- }
-
next = t->global_link;
// if the thread is not masking exceptions but there are
// pending exceptions on its queue, then something has gone
- // wrong:
+ // wrong. However, pending exceptions are OK if there is an
+ // FFI call.
ASSERT(t->blocked_exceptions == END_BLOCKED_EXCEPTIONS_QUEUE
+ || t->why_blocked == BlockedOnCCall
+ || t->why_blocked == BlockedOnCCall_Interruptible
|| (t->flags & TSO_BLOCKEX));
if (tmp == NULL) {