]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/tasks.c
Introduce the portSOFTWARE_BARRIER macro which thus far is only used by the Win32...
[freertos] / FreeRTOS / Source / tasks.c
index 5129bf981a6a4f9c4cc8d13a81e180118ef8d8c3..20044337e4675c68afa5835d6e555678b69593f1 100644 (file)
@@ -2113,7 +2113,17 @@ void vTaskSuspendAll( void )
        BaseType_t.  Please read Richard Barry's reply in the following link to a\r
        post in the FreeRTOS support forum before reporting this as a bug! -\r
        http://goo.gl/wu4acr */\r
+\r
+       /* portSOFRWARE_BARRIER() is only implemented for emulated/simulated ports that\r
+       do not otherwise exhibit real time behaviour. */\r
+       portSOFTWARE_BARRIER();\r
+\r
+       /* The scheduler is suspended if uxSchedulerSuspended is non-zero.  An increment\r
+       is used to allow calls to vTaskSuspendAll() to nest. */\r
        ++uxSchedulerSuspended;\r
+\r
+       /* Enforces ordering for ports and optimised compilers that may otherwise place\r
+       the above increment elsewhere. */\r
        portMEMORY_BARRIER();\r
 }\r
 /*----------------------------------------------------------*/\r