This seems to be possible, but with a little change (see the cygwin mailing list discussing this one here ):
SuspendThread(GetCurrentThread());
I also found that MSDN says that the thread should only pause, but this does not make me understand. I quote (from here , my hit):
This feature is primarily intended for use by debuggers. It is not intended for thread synchronization. Calling SuspendThread on a thread that owns a synchronization object, such as a mutex or critical sector, can lead to a deadlock if the calling thread tries to get a synchronization object that belongs to a suspended thread. To avoid this situation, a thread in an application that is not a debugger should signal that another thread is pausing . The target thread should be designed to follow this signal and respond accordingly.
source share