Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 119 of file thread.c.
Referenced by DestroySoundThread().
{ DWORD WaitResult; SND_ASSERT( Thread ); SND_TRACE(L"Waiting for READY event\n"); WaitForSingleObject(Thread->Events.Ready, INFINITE); Thread->Request.Result = MMSYSERR_NOTSUPPORTED; Thread->Request.Handler = SoundThreadTerminator; Thread->Request.SoundDeviceInstance = NULL; Thread->Request.Parameter = (PVOID) Thread; /* Notify the thread it has work to do */ SND_TRACE(L"Setting REQUEST event\n"); SetEvent(Thread->Events.Request); /* Wait for the work to be done */ SND_TRACE(L"Waiting for DONE event\n"); WaitForSingleObject(Thread->Events.Done, INFINITE); /* Wait for the thread to actually end */ WaitResult = WaitForSingleObject(Thread->Handle, INFINITE); SND_ASSERT( WaitResult == WAIT_OBJECT_0 ); /* Close the thread and invalidate the handle */ CloseHandle(Thread->Handle); /* Is this needed? */ Thread->Handle = INVALID_HANDLE_VALUE; return MMSYSERR_NOERROR; }