internal void AcquireGlobalThreadLock(SingleSteppingEngine caller)
{
if (has_thread_lock)
throw new InternalError ("Recursive thread lock");
thread_lock_mutex.Lock ();
Report.Debug (DebugFlags.Threads,
"Acquiring global thread lock: {0}", caller);
has_thread_lock = true;
foreach (ThreadServant thread in thread_hash.Values) {
if (thread == caller)
continue;
thread.AcquireThreadLock ();
}
Report.Debug (DebugFlags.Threads,
"Done acquiring global thread lock: {0}",
caller);
}