]> git.sur5r.net Git - freertos/commitdiff
Update Cortex-M MPU version to include new API functions.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 13 Jul 2013 19:37:35 +0000 (19:37 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 13 Jul 2013 19:37:35 +0000 (19:37 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1976 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

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

index 02ecad7d101c41a45e19dc99338d2c6b2190f07b..e663d4ef02a08e0ab9a2a1d137e114c298cc5f30 100644 (file)
@@ -108,6 +108,7 @@ only for ports that are using the MPU. */
                #define xTaskGetCurrentTaskHandle               MPU_xTaskGetCurrentTaskHandle\r
                #define xTaskGetSchedulerState                  MPU_xTaskGetSchedulerState\r
                #define xTaskGetIdleTaskHandle                  MPU_xTaskGetIdleTaskHandle\r
+               #define xTaskGetSystemState                             MPU_xTaskGetSystemState\r
 \r
                #define xQueueGenericCreate                             MPU_xQueueGenericCreate\r
                #define xQueueCreateMutex                               MPU_xQueueCreateMutex\r
@@ -125,6 +126,7 @@ only for ports that are using the MPU. */
                #define xQueueSelectFromSet                             MPU_xQueueSelectFromSet\r
                #define xQueueAddToSet                                  MPU_xQueueAddToSet\r
                #define xQueueRemoveFromSet                             MPU_xQueueRemoveFromSet\r
+               #define xQueuePeekFromISR                               MPU_xQueuePeekFromISR\r
 \r
                #define pvPortMalloc                                    MPU_pvPortMalloc\r
                #define vPortFree                                               MPU_vPortFree\r
index 315b67e25f91cfe6e7f15d9ee0b4597440878340..84cdf1afb9f815e366c85654cb66b852611775fa 100644 (file)
@@ -724,7 +724,7 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  * \defgroup xQueuePeekFromISR xQueuePeekFromISR\r
  * \ingroup QueueManagement\r
  */\r
-signed portBASE_TYPE xQueuePeekFromISR( xQueueHandle xQueue, void * const pvBuffer );\r
+signed portBASE_TYPE xQueuePeekFromISR( xQueueHandle xQueue, void * const pvBuffer ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * queue. h\r
index 7488f5ee7f6ff0ba58db28cab0006929f1198598..2c8e78adb5c985aab53328ba0791663a1759af47 100644 (file)
@@ -203,6 +203,7 @@ unsigned portBASE_TYPE MPU_uxTaskGetStackHighWaterMark( xTaskHandle xTask );
 xTaskHandle MPU_xTaskGetCurrentTaskHandle( void );\r
 portBASE_TYPE MPU_xTaskGetSchedulerState( void );\r
 xTaskHandle MPU_xTaskGetIdleTaskHandle( void );\r
+unsigned portBASE_TYPE MPU_xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime );\r
 xQueueHandle MPU_xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType );\r
 signed portBASE_TYPE MPU_xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );\r
 portBASE_TYPE MPU_xQueueGenericReset( xQueueHandle pxQueue, portBASE_TYPE xNewQueue );\r
@@ -224,6 +225,7 @@ xQueueSetHandle MPU_xQueueCreateSet( unsigned portBASE_TYPE uxEventQueueLength )
 xQueueSetMemberHandle MPU_xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks );\r
 portBASE_TYPE MPU_xQueueAddToSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet );\r
 portBASE_TYPE MPU_xQueueRemoveFromSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet );\r
+signed portBASE_TYPE MPU_xQueuePeekFromISR( xQueueHandle xQueue, void * const pvBuffer );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -917,6 +919,19 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
+#if ( configUSE_TRACE_FACILITY == 1 )\r
+       unsigned portBASE_TYPE MPU_xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime )\r
+       {\r
+       unsigned portBASE_TYPE uxReturn;\r
+       portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
+\r
+               uxReturn = xTaskGetSystemState( pxTaskStatusArray, uxArraySize, pulTotalRunTime );\r
+               portRESET_PRIVILEGE( xRunningPrivileged );\r
+               return xReturn;\r
+       }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )\r
        unsigned portBASE_TYPE MPU_uxTaskGetStackHighWaterMark( xTaskHandle xTask )\r
        {\r
@@ -1011,6 +1026,17 @@ signed portBASE_TYPE xReturn;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+signed portBASE_TYPE MPU_xQueuePeekFromISR( xQueueHandle pxQueue, void * const pvBuffer )\r
+{\r
+portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
+signed portBASE_TYPE xReturn;\r
+\r
+       xReturn = xQueuePeekFromISR( pxQueue, pvBuffer );\r
+       portRESET_PRIVILEGE( xRunningPrivileged );\r
+       return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 #if ( configUSE_MUTEXES == 1 )\r
        xQueueHandle MPU_xQueueCreateMutex( void )\r
        {\r
@@ -1225,4 +1251,5 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 \r
 #if configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS == 1\r
        #include "application_defined_privileged_functions.h"\r
-#endif
\ No newline at end of file
+#endif\r
+\r
index 5bf1ae7566a7731543985c60f6917e6dcda7d44a..403125724b58468a6b8073cedd1e717a27fb60ad 100644 (file)
@@ -175,7 +175,7 @@ PRIVILEGED_DATA tskTCB * volatile pxCurrentTCB = NULL;
 PRIVILEGED_DATA static xList pxReadyTasksLists[ configMAX_PRIORITIES ];        /*< Prioritised ready tasks. */\r
 PRIVILEGED_DATA static xList xDelayedTaskList1;                                                        /*< Delayed tasks. */\r
 PRIVILEGED_DATA static xList xDelayedTaskList2;                                                        /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */\r
-PRIVILEGED_DATA static xList * volatile pxDelayedTaskList ;                            /*< Points to the delayed task list currently being used. */\r
+PRIVILEGED_DATA static xList * volatile pxDelayedTaskList                            /*< Points to the delayed task list currently being used. */\r
 PRIVILEGED_DATA static xList * volatile pxOverflowDelayedTaskList;             /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */\r
 PRIVILEGED_DATA static xList xPendingReadyList;                                                        /*< Tasks that have been readied while the scheduler was suspended.  They will be moved to the ready list when the scheduler is resumed. */\r
 \r
@@ -198,7 +198,7 @@ PRIVILEGED_DATA static xList xPendingReadyList;                                                     /*< Tasks that have been r
 \r
 #endif\r
 \r
-/* File private variables. --------------------------------*/\r
+/* Other file private variables. --------------------------------*/\r
 PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxCurrentNumberOfTasks  = ( unsigned portBASE_TYPE ) 0U;\r
 PRIVILEGED_DATA static volatile portTickType xTickCount                                                = ( portTickType ) 0U;\r
 PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxTopReadyPriority              = tskIDLE_PRIORITY;\r