Skip to content
Snippets Groups Projects
Commit b0ad86fb authored by GHC GitLab CI's avatar GHC GitLab CI
Browse files

nonmoving: Add comments to nonmovingResurrectThreads

parent b1b55be1
No related branches found
No related tags found
No related merge requests found
...@@ -1929,6 +1929,8 @@ void nonmovingTidyThreads () ...@@ -1929,6 +1929,8 @@ void nonmovingTidyThreads ()
} }
} }
// Mark threads which appear to be dead but still need to be properly torn down
// by resurrectThreads.
void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_threads) void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_threads)
{ {
StgTSO *next; StgTSO *next;
...@@ -1940,6 +1942,9 @@ void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_t ...@@ -1940,6 +1942,9 @@ void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_t
case ThreadComplete: case ThreadComplete:
continue; continue;
default: default:
// The thread may be, e.g., deadlocked in which case we must ensure
// it isn't swept since resurrectThreads will need to throw it an
// exception.
markQueuePushClosure_(queue, (StgClosure*)t); markQueuePushClosure_(queue, (StgClosure*)t);
t->global_link = *resurrected_threads; t->global_link = *resurrected_threads;
*resurrected_threads = t; *resurrected_threads = t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment