]> git.sur5r.net Git - freertos/commitdiff
Add eTaskStateGet() to FreeRTOS-MPU.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 23 Sep 2012 09:35:53 +0000 (09:35 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 23 Sep 2012 09:35:53 +0000 (09:35 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1780 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/include/mpu_wrappers.h
FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c

index be49c3d88bd9a8bec223a50e68eccab9e11a33bf..5836047ed861430be6b3077f471e347a4c2821cc 100644 (file)
@@ -83,6 +83,7 @@ only for ports that are using the MPU. */
                #define vTaskDelay                                              MPU_vTaskDelay\r
                #define uxTaskPriorityGet                               MPU_uxTaskPriorityGet\r
                #define vTaskPrioritySet                                MPU_vTaskPrioritySet\r
+               #define eTaskStateGet                                   MPU_eTaskStateGet\r
                #define vTaskSuspend                                    MPU_vTaskSuspend\r
                #define xTaskIsTaskSuspended                    MPU_xTaskIsTaskSuspended\r
                #define vTaskResume                                             MPU_vTaskResume\r
index 6bd0159859eb5d7aa491b3df9be58aacd820a2f1..d2cbbeacc3e1bfc8453f3294a90130aa6deb48dd 100644 (file)
@@ -178,6 +178,7 @@ void MPU_vTaskDelayUntil( portTickType * const pxPreviousWakeTime, portTickType
 void MPU_vTaskDelay( portTickType xTicksToDelay );\r
 unsigned portBASE_TYPE MPU_uxTaskPriorityGet( xTaskHandle pxTask );\r
 void MPU_vTaskPrioritySet( xTaskHandle pxTask, unsigned portBASE_TYPE uxNewPriority );\r
+eTaskState MPU_eTaskStateGet( xTaskHandle pxTask );\r
 void MPU_vTaskSuspend( xTaskHandle pxTaskToSuspend );\r
 signed portBASE_TYPE MPU_xTaskIsTaskSuspended( xTaskHandle xTask );\r
 void MPU_vTaskResume( xTaskHandle pxTaskToResume );\r
@@ -733,6 +734,19 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
+#if ( INCLUDE_eTaskStateGet == 1 )\r
+       eTaskState MPU_eTaskStateGet( xTaskHandle pxTask )\r
+       {\r
+    portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
+       eTaskState eReturn;\r
+\r
+               eReturn = eTaskStateGet( pxTask );\r
+        portRESET_PRIVILEGE( xRunningPrivileged );\r
+               return eReturn;\r
+       }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
 #if ( INCLUDE_vTaskSuspend == 1 )\r
        void MPU_vTaskSuspend( xTaskHandle pxTaskToSuspend )\r
        {\r