]> git.sur5r.net Git - freertos/commitdiff
Add xQueueGetMutexHolder() to MPU functions.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 24 Apr 2014 12:29:40 +0000 (12:29 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 24 Apr 2014 12:29:40 +0000 (12:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2239 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

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

index 360b4f92b662cb352b324f93985a0ca3671c2862..0472c46c057f6d885b782765b003788354c6daf4 100644 (file)
@@ -117,6 +117,7 @@ only for ports that are using the MPU. */
                #define xQueueAddToSet                                  MPU_xQueueAddToSet\r
                #define xQueueRemoveFromSet                             MPU_xQueueRemoveFromSet\r
                #define xQueuePeekFromISR                               MPU_xQueuePeekFromISR\r
+               #define xQueueGetMutexHolder                    MPU_xQueueGetMutexHolder\r
 \r
                #define pvPortMalloc                                    MPU_pvPortMalloc\r
                #define vPortFree                                               MPU_vPortFree\r
index 116f1ba38b9ab3cf3119688d67b66f5351be34e4..9465aa1418dfa116db11539d6c117497ca9a18a6 100644 (file)
@@ -216,6 +216,7 @@ QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, Tick
 BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
 BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
 BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer );\r
+void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -1016,6 +1017,17 @@ BaseType_t xReturn;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore )\r
+{\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+void * xReturn;\r
+\r
+       xReturn = ( void * ) xQueueGetMutexHolder( xSemaphore );\r
+       portRESET_PRIVILEGE( xRunningPrivileged );\r
+       return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 #if ( configUSE_MUTEXES == 1 )\r
        QueueHandle_t MPU_xQueueCreateMutex( void )\r
        {\r