diff options
| author | Yuxin Zhou <[email protected]> | 2021-10-14 00:51:26 +0000 |
|---|---|---|
| committer | Yuxin Zhou <[email protected]> | 2021-10-14 00:51:26 +0000 |
| commit | 1af8404c54f9c8d3caa2ac3523c2a5f014aecb1c (patch) | |
| tree | 93e4f4d64ec8c21c01b77f19b8e7326e85227e3d /common_smp/src/tx_queue_delete.c | |
| parent | 215df45d4b59d4ce8606a88f566d1d426e64a84c (diff) | |
Release 6.1.9
Diffstat (limited to 'common_smp/src/tx_queue_delete.c')
| -rw-r--r-- | common_smp/src/tx_queue_delete.c | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/common_smp/src/tx_queue_delete.c b/common_smp/src/tx_queue_delete.c index a2755a50..c0fb13ce 100644 --- a/common_smp/src/tx_queue_delete.c +++ b/common_smp/src/tx_queue_delete.c @@ -12,8 +12,8 @@ /**************************************************************************/ /**************************************************************************/ -/** */ -/** ThreadX Component */ +/** */ +/** ThreadX Component */ /** */ /** Queue */ /** */ @@ -31,44 +31,46 @@ #include "tx_queue.h" -/**************************************************************************/ -/* */ -/* FUNCTION RELEASE */ -/* */ -/* _tx_queue_delete PORTABLE C */ +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _tx_queue_delete PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ -/* */ -/* This function deletes the specified queue. All threads suspended */ -/* on the queue are resumed with the TX_DELETED status code. */ -/* */ -/* INPUT */ -/* */ -/* queue_ptr Pointer to queue control block */ -/* */ -/* OUTPUT */ -/* */ -/* TX_SUCCESS Successful completion status */ -/* */ -/* CALLS */ -/* */ -/* _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 queue. All threads suspended */ +/* on the queue are resumed with the TX_DELETED status code. */ +/* */ +/* INPUT */ +/* */ +/* queue_ptr Pointer to queue control block */ +/* */ +/* OUTPUT */ +/* */ +/* TX_SUCCESS Successful completion status */ +/* */ +/* CALLS */ +/* */ +/* _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_queue_delete(TX_QUEUE *queue_ptr) @@ -76,7 +78,7 @@ UINT _tx_queue_delete(TX_QUEUE *queue_ptr) TX_INTERRUPT_SAVE_AREA -TX_THREAD *thread_ptr; +TX_THREAD *thread_ptr; TX_THREAD *next_thread; UINT suspended_count; TX_QUEUE *next_queue; @@ -123,9 +125,9 @@ TX_QUEUE *previous_queue; /* See if we have to update the created list head pointer. */ if (_tx_queue_created_ptr == queue_ptr) { - + /* Yes, move the head pointer to the next link. */ - _tx_queue_created_ptr = next_queue; + _tx_queue_created_ptr = next_queue; } } @@ -133,7 +135,7 @@ TX_QUEUE *previous_queue; _tx_thread_preempt_disable++; /* Pickup the suspension information. */ - thread_ptr = queue_ptr -> tx_queue_suspension_list; + thread_ptr = queue_ptr -> tx_queue_suspension_list; queue_ptr -> tx_queue_suspension_list = TX_NULL; suspended_count = queue_ptr -> tx_queue_suspended_count; queue_ptr -> tx_queue_suspended_count = TX_NO_SUSPENSIONS; @@ -145,14 +147,14 @@ TX_QUEUE *previous_queue; on this queue. */ while (suspended_count != TX_NO_SUSPENSIONS) { - + /* 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; |
