]> git.sur5r.net Git - freertos/commitdiff
Added a little intelligence to eTaskGetState() so it can distinguish between a suspen...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 22 Oct 2013 09:30:58 +0000 (09:30 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 22 Oct 2013 09:30:58 +0000 (09:30 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2068 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/tasks.c

index 48648d329ebb77b54b1f135134cfb644b4a39aa2..768c13358d11e3d32a5c4ba62847fb54b6dd4952 100644 (file)
@@ -844,8 +844,16 @@ tskTCB * pxNewTCB;
                                else if( pxStateList == &xSuspendedTaskList )\r
                                {\r
                                        /* The task being queried is referenced from the suspended\r
-                                       list. */\r
-                                       eReturn = eSuspended;\r
+                                       list.  Is it genuinely suspended or is it block \r
+                                       indefinitely? */\r
+                                       if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL )\r
+                                       {\r
+                                               eReturn = eSuspended;\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               eReturn = eBlocked;\r
+                                       }\r
                                }\r
                        #endif\r
 \r