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 */
/** */
/** Mutex */
/** */
@@ -31,46 +31,48 @@
#include "tx_mutex.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_mutex_delete PORTABLE C */
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_mutex_delete PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function deletes the specified mutex. All threads */
/* suspended on the mutex are resumed with the TX_DELETED status */
/* code. */
/* */
/* INPUT */
/* */
/* mutex_ptr Pointer to mutex control block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Successful completion status */
/* */
/* CALLS */
/* */
/* _tx_mutex_put Release an owned mutex */
/* _tx_thread_system_preempt_check Check for preemption */
/* _tx_thread_system_resume Resume thread service */
/* _tx_thread_system_ni_resume Non-interruptable resume thread */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This function deletes the specified mutex. All threads */
/* suspended on the mutex are resumed with the TX_DELETED status */
/* code. */
/* */
/* INPUT */
/* */
/* mutex_ptr Pointer to mutex control block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Successful completion status */
/* */
/* CALLS */
/* */
/* _tx_mutex_put Release an owned mutex */
/* _tx_thread_system_preempt_check Check for preemption */
/* _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_mutex_delete(TX_MUTEX *mutex_ptr)
@@ -78,7 +80,7 @@ UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr)
TX_INTERRUPT_SAVE_AREA
TX_THREAD *thread_ptr;
TX_THREAD *thread_ptr;
TX_THREAD *next_thread;
TX_THREAD *owner_thread;
UINT suspended_count;
@@ -108,7 +110,7 @@ UINT status;
/* Decrement the created count. */
_tx_mutex_created_count--;
/* See if the mutex is the only one on the list. */
if (_tx_mutex_created_count == TX_EMPTY)
{
@@ -128,9 +130,9 @@ UINT status;
/* See if we have to update the created list head pointer. */
if (_tx_mutex_created_ptr == mutex_ptr)
{
/* Yes, move the head pointer to the next link. */
_tx_mutex_created_ptr = next_mutex;
_tx_mutex_created_ptr = next_mutex;
}
}
@@ -138,7 +140,7 @@ UINT status;
_tx_thread_preempt_disable++;
/* Pickup the suspension information. */
thread_ptr = mutex_ptr -> tx_mutex_suspension_list;
thread_ptr = mutex_ptr -> tx_mutex_suspension_list;
mutex_ptr -> tx_mutex_suspension_list = TX_NULL;
suspended_count = mutex_ptr -> tx_mutex_suspended_count;
mutex_ptr -> tx_mutex_suspended_count = TX_NO_SUSPENSIONS;
@@ -154,10 +156,10 @@ UINT status;
{
/* Yes, remove this mutex from the owned list. */
/* Set the ownership count to 1. */
mutex_ptr -> tx_mutex_ownership_count = ((UINT) 1);
/* Restore interrupts. */
TX_RESTORE
@@ -172,7 +174,7 @@ UINT status;
#endif
/* Disable interrupts. */
TX_DISABLE
TX_DISABLE
}
/* Restore interrupts. */
@@ -182,14 +184,14 @@ UINT status;
on this mutex. */
while (suspended_count != ((ULONG) 0))
{
/* Decrement the suspension count. */
suspended_count--;
/* Lockout interrupts. */
TX_DISABLE
/* Clear the cleanup pointer, this prevents the timeout from doing
/* Clear the cleanup pointer, this prevents the timeout from doing
anything. */
thread_ptr -> tx_thread_suspend_cleanup = TX_NULL;
@@ -213,7 +215,7 @@ UINT status;
/* Restore interrupts. */
TX_RESTORE
/* Resume the thread. */
_tx_thread_system_resume(thread_ptr);
#endif