Release 6.1.9

This commit is contained in:
Yuxin Zhou
2021-10-14 00:51:26 +00:00
parent 215df45d4b
commit 1af8404c54
1812 changed files with 60698 additions and 249862 deletions

View File

@@ -12,8 +12,8 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** ThreadX Component */
/** */
/** Block Pool */
/** */
@@ -31,43 +31,45 @@
#include "tx_block_pool.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_block_release PORTABLE C */
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_block_release PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function returns a previously allocated block to its */
/* associated memory block pool. */
/* */
/* INPUT */
/* */
/* block_ptr Pointer to memory block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Successful completion status */
/* */
/* CALLS */
/* */
/* _tx_thread_system_resume Resume thread service */
/* _tx_thread_system_ni_resume Non-interruptable resume thread */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This function returns a previously allocated block to its */
/* associated memory block pool. */
/* */
/* INPUT */
/* */
/* block_ptr Pointer to memory block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Successful completion status */
/* */
/* CALLS */
/* */
/* _tx_thread_system_resume Resume thread service */
/* _tx_thread_system_ni_resume Non-interruptable resume thread */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _tx_block_release(VOID *block_ptr)
@@ -75,9 +77,9 @@ UINT _tx_block_release(VOID *block_ptr)
TX_INTERRUPT_SAVE_AREA
TX_BLOCK_POOL *pool_ptr;
TX_THREAD *thread_ptr;
UCHAR *work_ptr;
TX_BLOCK_POOL *pool_ptr;
TX_THREAD *thread_ptr;
UCHAR *work_ptr;
UCHAR **return_block_ptr;
UCHAR **next_block_ptr;
UINT suspended_count;
@@ -88,7 +90,7 @@ TX_THREAD *previous_thread;
/* Disable interrupts to put this block back in the pool. */
TX_DISABLE
/* Pickup the pool pointer which is just previous to the starting
/* Pickup the pool pointer which is just previous to the starting
address of the block that the caller sees. */
work_ptr = TX_VOID_TO_UCHAR_POINTER_CONVERT(block_ptr);
work_ptr = TX_UCHAR_POINTER_SUB(work_ptr, (sizeof(UCHAR *)));
@@ -119,7 +121,7 @@ TX_THREAD *previous_thread;
/* Decrement the number of threads suspended. */
(pool_ptr -> tx_block_pool_suspended_count)--;
/* Pickup the suspended count. */
suspended_count = (pool_ptr -> tx_block_pool_suspended_count);
@@ -145,8 +147,8 @@ TX_THREAD *previous_thread;
previous_thread = thread_ptr -> tx_thread_suspended_previous;
next_thread -> tx_thread_suspended_previous = previous_thread;
previous_thread -> tx_thread_suspended_next = next_thread;
}
}
/* Prepare for resumption of the first thread. */
/* Clear cleanup routine to avoid timeout. */
@@ -159,7 +161,7 @@ TX_THREAD *previous_thread;
*return_block_ptr = work_ptr;
/* Put return status into the thread control block. */
thread_ptr -> tx_thread_suspend_status = TX_SUCCESS;
thread_ptr -> tx_thread_suspend_status = TX_SUCCESS;
#ifdef TX_NOT_INTERRUPTABLE
@@ -189,7 +191,7 @@ TX_THREAD *previous_thread;
*next_block_ptr = pool_ptr -> tx_block_pool_available_list;
/* Adjust the head pointer. */
pool_ptr -> tx_block_pool_available_list = work_ptr;
pool_ptr -> tx_block_pool_available_list = work_ptr;
/* Increment the count of available blocks. */
pool_ptr -> tx_block_pool_available++;