]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.c
Update to MIT licensed FreeRTOS V10.0.0 - see https://www.freertos.org/History.txt
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-UDP / portable / BufferManagement / BufferAllocation_2.c
index e86ec6c8412e01f47782a29b2ae19148ca06c8cc..a4b829a546597db6f2bc4486a8fbe18653b6d422 100644 (file)
@@ -1,40 +1,29 @@
 /*\r
- * FreeRTOS+UDP V1.0.0 (C) 2013 Real Time Engineers ltd.\r
+ * FreeRTOS+UDP V1.0.4\r
+ * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
- * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
- * terms are different to the FreeRTOS license terms.\r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
+ * this software and associated documentation files (the "Software"), to deal in\r
+ * the Software without restriction, including without limitation the rights to\r
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
+ * the Software, and to permit persons to whom the Software is furnished to do so,\r
+ * subject to the following conditions:\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
- * under a pure GPL open source license (as opposed to the modified GPL license\r
- * under which FreeRTOS is distributed) or a commercial license.  Details of\r
- * both license options follow:\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
  *\r
- * - Open source licensing -\r
- * FreeRTOS+UDP is a free download and may be used, modified, evaluated and\r
- * distributed without charge provided the user adheres to version two of the\r
- * GNU General Public License (GPL) and does not remove the copyright notice or\r
- * this text.  The GPL V2 text is available on the gnu.org web site, and on the\r
- * following URL: http://www.FreeRTOS.org/gpl-2.0.txt.\r
- *\r
- * - Commercial licensing -\r
- * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
- * and do not require any source files to be changed.\r
- *\r
- * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
- * use FreeRTOS+UDP unless you agree that you use the software 'as is'.\r
- * FreeRTOS+UDP is provided WITHOUT ANY WARRANTY; without even the implied\r
- * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
- * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they\r
- * implied, expressed, or statutory.\r
- *\r
- * 1 tab == 4 spaces!\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
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
  *\r
  * http://www.FreeRTOS.org\r
- * http://www.FreeRTOS.org/udp\r
+ * http://aws.amazon.com/freertos\r
  *\r
+ * 1 tab == 4 spaces!\r
  */\r
 \r
 /******************************************************************************\r
@@ -82,9 +71,9 @@ static xSemaphoreHandle xNetworkBufferSemaphore = NULL;
 \r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xNetworkBuffersInitialise( void )\r
+BaseType_t xNetworkBuffersInitialise( void )\r
 {\r
-portBASE_TYPE xReturn, x;\r
+BaseType_t xReturn, x;\r
 \r
        /* Only initialise the buffers and their associated kernel objects if they\r
        have not been initialised before. */\r
@@ -92,7 +81,7 @@ portBASE_TYPE xReturn, x;
        {\r
                xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFERS, ipconfigNUM_NETWORK_BUFFERS );\r
                configASSERT( xNetworkBufferSemaphore );\r
-               vQueueAddToRegistry( xNetworkBufferSemaphore, ( signed char * ) "NetBufSem" );\r
+               vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" );\r
 \r
                /* If the trace recorder code is included name the semaphore for viewing\r
                in FreeRTOS+Trace.  */\r
@@ -174,7 +163,7 @@ void vEthernetBufferRelease( uint8_t *pucEthernetBuffer )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks )\r
+xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks )\r
 {\r
 xNetworkBufferDescriptor_t *pxReturn = NULL;\r
 \r
@@ -244,7 +233,7 @@ xNetworkBufferDescriptor_t *pxReturn = NULL;
 \r
 void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
 {\r
-portBASE_TYPE xListItemAlreadyInFreeList;\r
+BaseType_t xListItemAlreadyInFreeList;\r
 \r
        /* Ensure the buffer is returned to the list of free buffers before the\r
        counting semaphore is 'given' to say a buffer is available.  Release the\r
@@ -274,7 +263,7 @@ portBASE_TYPE xListItemAlreadyInFreeList;
 \r
 #if( ipconfigINCLUDE_TEST_CODE == 1 )\r
 \r
-unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void )\r
+UBaseType_t uxGetNumberOfFreeNetworkBuffers( void )\r
 {\r
        return listCURRENT_LIST_LENGTH( &xFreeBuffersList );\r
 }\r