]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/StaticAllocation.c
Kernel source code:
[freertos] / FreeRTOS / Demo / Common / Minimal / StaticAllocation.c
index 71d4d00b77dc879ca1bd2f7e953a8d278e436e32..21b20bcb153f707b3d72258eefbd95685602bfcc 100644 (file)
@@ -244,7 +244,7 @@ stalled. */
 static volatile UBaseType_t uxCycleCounter = 0;\r
 \r
 /* A variable that gets set to pdTRUE if an error is detected. */\r
-static BaseType_t xErrorOccurred = pdFALSE;\r
+static volatile BaseType_t xErrorOccurred = pdFALSE;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -346,7 +346,7 @@ TickType_t xTickCount;
        xTickCount = xTaskGetTickCount();\r
        xReturned = xSemaphoreTake( xSemaphore, xShortBlockTime );\r
 \r
-       if( ( xTaskGetTickCount() - xTickCount) < xShortBlockTime )\r
+       if( ( ( TickType_t ) ( xTaskGetTickCount() - xTickCount ) ) < xShortBlockTime )\r
        {\r
                /* Did not block on the semaphore as long as expected. */\r
                xErrorOccurred = pdTRUE;\r
@@ -396,7 +396,7 @@ TickType_t xTickCount;
        xTickCount = xTaskGetTickCount();\r
        xReturned = xSemaphoreTake( xSemaphore, xShortBlockTime );\r
 \r
-       if( ( xTaskGetTickCount() - xTickCount) < xShortBlockTime )\r
+       if( ( ( TickType_t ) ( xTaskGetTickCount() - xTickCount ) ) < xShortBlockTime )\r
        {\r
                /* Did not block on the semaphore as long as expected. */\r
                xErrorOccurred = pdTRUE;\r