I would like some clarifications on Terminate and SuspendThread - specifically when thread is executing in kernel.
You mentioned that terminate kicks the thread out of waits. Is that true only of UserMode waits or also of KernelMode waits? If it is true of KernelMode waits, does it bring it out both alertable and non-alterable or only alertable?
What are the mechanics of suspend? Does it also involve a kernel apc which queues a user apc which executes only when thread unwinds from kernel? Or in case of suspend does kernel apc itself suspend the thread?