ReleaseMutex( pvInterruptEventMutex );\r
}\r
}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPortCheckCorrectThreadIsRunning( void )\r
+{\r
+xThreadState *pxThreadState = ( xThreadState * ) *( ( unsigned long * ) pxCurrentTCB );\r
+\r
+ /* When switching threads, Windows does not always seem to run the selected\r
+ thread immediately. This function can be called to check if the thread\r
+ that is currently running is the thread that is responsible for executing\r
+ the task selected by the real time scheduler. */\r
+ if( GetCurrentThread() != pxThreadState->pvThread )\r
+ {\r
+ SwitchToThread();\r
+ }\r
+}\r
\r