WaitforsingleObject (S_EMPTY, Infinite);
WaitforsingleObject (s_inputmutex, infinite);
g_pinputqueue-> push ();
ReleaseSemaphore (S_INPUTMUTEX, 1, NULL);
ReleaseSemaphore (s_full, 1, null);
//
WaitforsingleObject (S_Full, Infinite);
WaitforsingleObject (s_inputmutex, infinite);
g_pinputqueue-> POP ();
ReleaseSemaphore (S_INPUTMUTEX, 1, NULL);
ReleaseseSemaphore (S_EMPTY, 1, NULL);