summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c')
-rw-r--r--FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
index 11dc00f01..93fde9590 100644
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
@@ -1,5 +1,5 @@
/*
- * FreeRTOS+TCP V2.0.7
+ * FreeRTOS+TCP V2.0.11
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -199,7 +199,7 @@ extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewL
/*-----------------------------------------------------------*/
-/* TCP segement pool. */
+/* TCP segment pool. */
#if( ipconfigUSE_TCP_WIN == 1 )
static TCPSegment_t *xTCPSegments = NULL;
#endif /* ipconfigUSE_TCP_WIN == 1 */
@@ -673,6 +673,23 @@ const int32_t l500ms = 500;
}
/*-----------------------------------------------------------*/
+#if( ipconfigUSE_TCP_WIN == 1 )
+
+ void vTCPSegmentCleanup( void )
+ {
+ /* Free and clear the TCP segments pointer. This function should only be called
+ * once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this
+ * function. */
+ if( xTCPSegments != NULL )
+ {
+ vPortFreeLarge( xTCPSegments );
+ xTCPSegments = NULL;
+ }
+ }
+
+#endif /* ipconfgiUSE_TCP_WIN == 1 */
+/*-----------------------------------------------------------*/
+
/*=============================================================================
*
* ###### # #