]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/tasks.c
Add test and correct code for the unusual case of a task using an event group to...
[freertos] / FreeRTOS / Source / tasks.c
index 8512e1bbc6ed75dea716716ba54ae24f557b9409..c20aeed54043a8aa8fcaeac21ce055970b33a1ba 100644 (file)
@@ -760,7 +760,11 @@ TCB_t * pxNewTCB;
                        {\r
                                /* Reset the next expected unblock time in case it referred to\r
                                the task that has just been deleted. */\r
-                               prvResetNextTaskUnblockTime();\r
+                               taskENTER_CRITICAL();\r
+                               {\r
+                                       prvResetNextTaskUnblockTime();\r
+                               }\r
+                               taskEXIT_CRITICAL();\r
                        }\r
                }\r
        }\r
@@ -1259,7 +1263,11 @@ TCB_t * pxNewTCB;
                                /* A task other than the currently running task was suspended,\r
                                reset the next expected unblock time in case it referred to the\r
                                task that is now in the Suspended state. */\r
-                               prvResetNextTaskUnblockTime();\r
+                               taskENTER_CRITICAL();\r
+                               {\r
+                                       prvResetNextTaskUnblockTime();\r
+                               }\r
+                               taskEXIT_CRITICAL();\r
                        }\r
                        else\r
                        {\r