Hi, The previous patch that introduced the new interrupting method, leaves some chances for the inferior to mess the interrupting, since the operation is not atomic. For example by tweaking its own thread's priorities or if the inferior is calling ResumeThread in its own threads while gdbserver is stopping them. Here is the patch that tweaks gdbserver's priorities so to minimize those chances. This can never be perfect, since, now we may be adding a bit of extra entropy to other components of the system, especially true in WinCE, where we may be inhibiting some other lower priority thread to execute, even if just for a little. For WinCE, I'm putting the ceiling on the highest application priority, which is normally lower than what the time critical drivers threads use. This is mostly Leo's code. I've splitted it from his previous patch, fixed and cleaned a few things here and there, added WinCE support, and regtested it on a local i686-pc-cygwin gdbserver and against a remote arm-wince gdbserver. Leo, did I miss anything? Cheers, Pedro Alves