summaryrefslogtreecommitdiff
path: root/common_smp/src/tx_block_pool_performance_info_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'common_smp/src/tx_block_pool_performance_info_get.c')
-rw-r--r--common_smp/src/tx_block_pool_performance_info_get.c96
1 files changed, 49 insertions, 47 deletions
diff --git a/common_smp/src/tx_block_pool_performance_info_get.c b/common_smp/src/tx_block_pool_performance_info_get.c
index 5a41661e..71112031 100644
--- a/common_smp/src/tx_block_pool_performance_info_get.c
+++ b/common_smp/src/tx_block_pool_performance_info_get.c
@@ -12,8 +12,8 @@
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Block Memory */
/** */
@@ -32,50 +32,52 @@
#endif
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_block_pool_performance_info_get PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_block_pool_performance_info_get PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function retrieves performance information from the specified */
-/* block pool. */
-/* */
-/* INPUT */
-/* */
-/* pool_ptr Pointer to block pool control blk */
-/* allocates Destination for the number of */
-/* allocations from this pool */
-/* releases Destination for the number of */
-/* blocks released back to pool */
-/* suspensions Destination for number of */
-/* suspensions on this pool */
-/* timeouts Destination for number of timeouts*/
-/* on this pool */
-/* */
-/* OUTPUT */
-/* */
-/* status Completion status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* This function retrieves performance information from the specified */
+/* block pool. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to block pool control blk */
+/* allocates Destination for the number of */
+/* allocations from this pool */
+/* releases Destination for the number of */
+/* blocks released back to pool */
+/* suspensions Destination for number of */
+/* suspensions on this pool */
+/* timeouts Destination for number of timeouts*/
+/* on this pool */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* 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_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases,
@@ -91,7 +93,7 @@ UINT status;
/* Determine if this is a legal request. */
if (pool_ptr == TX_NULL)
{
-
+
/* Block pool pointer is illegal, return error. */
status = TX_PTR_ERROR;
}
@@ -99,13 +101,13 @@ UINT status;
/* Determine if the pool ID is invalid. */
else if (pool_ptr -> tx_block_pool_id != TX_BLOCK_POOL_ID)
{
-
+
/* Block pool pointer is illegal, return error. */
status = TX_PTR_ERROR;
}
else
{
-
+
/* Disable interrupts. */
TX_DISABLE
@@ -121,28 +123,28 @@ UINT status;
/* Retrieve the number of allocations from this block pool. */
if (allocates != TX_NULL)
{
-
+
*allocates = pool_ptr -> tx_block_pool_performance_allocate_count;
}
/* Retrieve the number of blocks released to this block pool. */
if (releases != TX_NULL)
{
-
+
*releases = pool_ptr -> tx_block_pool_performance_release_count;
}
/* Retrieve the number of thread suspensions on this block pool. */
if (suspensions != TX_NULL)
{
-
+
*suspensions = pool_ptr -> tx_block_pool_performance_suspension_count;
}
/* Retrieve the number of thread timeouts on this block pool. */
if (timeouts != TX_NULL)
{
-
+
*timeouts = pool_ptr -> tx_block_pool_performance_timeout_count;
}
@@ -155,7 +157,7 @@ UINT status;
#else
UINT status;
-
+
/* Access input arguments just for the sake of lint, MISRA, etc. */
if (pool_ptr != TX_NULL)
{
@@ -189,7 +191,7 @@ UINT status;
}
else
{
-
+
/* Not enabled, return error. */
status = TX_FEATURE_NOT_ENABLED;
}