Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 265 of file wave.c.
Referenced by StartSessionThread().
{ MMRESULT result = MMSYSERR_ERROR; SessionInfo* session_info = (SessionInfo*) parameter; BOOL terminate = FALSE; /* All your CPU time are belong to us */ SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); DPRINT("Wave processing thread setting ready state\n"); SetEvent(session_info->thread.ready_event); while ( ! terminate ) { /* Wait for GO event, or IO completion notification */ while ( WaitForSingleObjectEx(session_info->thread.go_event, INFINITE, TRUE) == WAIT_IO_COMPLETION ) { /* A buffer has been finished with - pass back to the client */ ReturnCompletedBuffers(session_info); } DPRINT("Wave processing thread woken up\n"); /* Set the terminate flag if that's what the caller wants */ terminate = (session_info->thread.function == DRVM_TERMINATE); /* Process the request */ DPRINT("Processing thread request\n"); result = ProcessSessionThreadRequest(session_info); /* Store the result code */ session_info->thread.result = result; /* Submit new buffers and continue existing ones */ DPRINT("Performing wave I/O\n"); PerformWaveIO(session_info); /* Now we're ready for more action */ DPRINT("Wave processing thread sleeping\n"); SetEvent(session_info->thread.ready_event); } return 0; }