Skip to content

Commit

Permalink
Also unlock the loader for the visit_fn
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Dec 28, 2023
1 parent 3d5b242 commit 37d2810
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/thread_freezer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,18 @@ void execute_while_frozen(
}

if (visit_fn) {
// Unlock the loader lock.
if (lock_loader != nullptr && unlock_loader != nullptr) {
unlock_loader(0, loader_magic);
}

visit_fn(thread_id, thread, thread_ctx);

// Lock it again.
if (lock_loader != nullptr && unlock_loader != nullptr) {
loader_magic = 0;
lock_loader(0, NULL, &loader_magic);
}
}

++num_threads_frozen;
Expand Down

0 comments on commit 37d2810

Please sign in to comment.