WaitforsingleObject (s_inputmutex, infinite);
g_pinputqueue-> POP ();
ReleaseSemaphore (S_INPUTMUTEX, 1, NULL);
g_pinputqueue-> push