"Thomas Kho" tkho@ucla.edu writes:
I was thinking that cloning the process could take care of deadlocks. What if the cloned thread fudges its teb and sets a different thread id than its cloning thread? This invalidates all locks in the cloned thread taken by the cloning thread. Both threads continue and any contention would be handled in the already thread-safe manner.
Simply cloning the thread is not going to solve anything. You need to build a proper Win32 context for that thread; but then of course your problem is solved, and you don't need to make it create another thread...