When SuspendThread is called on an already-suspended thread, it would send another pthread_kill signal, which would nest signal handlers and create multiple outstanding sem_wait calls while Resume only posts once when count reaches 0. Instead we increment suspend count and skip redundant signal.