]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/Common/mpu_wrappers.c
First pass at updating from MISRA 2004 to MISRA 2012:
[freertos] / FreeRTOS / Source / portable / Common / mpu_wrappers.c
index 003e3a0fe7bcdaec6b665a0adb85023c1f79ee8e..b08a834117b4934bdc8123d4dc3b1c35aadcc995 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * FreeRTOS Kernel V10.0.0\r
+ * FreeRTOS Kernel V10.0.1\r
  * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
@@ -10,8 +10,7 @@
  * subject to the following conditions:\r
  *\r
  * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software. If you wish to use our Amazon\r
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.\r
+ * copies or substantial portions of the Software.\r
  *\r
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
@@ -164,7 +163,7 @@ BaseType_t xRunningPrivileged = xPortRaisePrivilege();
 /*-----------------------------------------------------------*/\r
 \r
 #if ( INCLUDE_uxTaskPriorityGet == 1 )\r
-       UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t pxTask )\r
+       UBaseType_t MPU_uxTaskPriorityGet( const TaskHandle_t pxTask )\r
        {\r
        UBaseType_t uxReturn;\r
        BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
@@ -697,7 +696,7 @@ void * xReturn;
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
-#if ( configUSE_MUTEXES == 1 )\r
+#if ( configUSE_RECURSIVE_MUTEXES == 1 )\r
        BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xBlockTime )\r
        {\r
        BaseType_t xReturn;\r
@@ -710,7 +709,7 @@ void * xReturn;
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
-#if ( configUSE_MUTEXES == 1 )\r
+#if ( configUSE_RECURSIVE_MUTEXES == 1 )\r
        BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t xMutex )\r
        {\r
        BaseType_t xReturn;\r
@@ -1137,6 +1136,18 @@ BaseType_t xRunningPrivileged = xPortRaisePrivilege();
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer )\r
+{\r
+size_t xReturn;\r
+BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
+\r
+       xReturn = xStreamBufferNextMessageLengthBytes( xStreamBuffer );\r
+       vPortResetPrivilege( xRunningPrivileged );\r
+\r
+       return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait )\r
 {\r
 size_t xReturn;\r