diff options
Diffstat (limited to 'common_smp/src/tx_thread_terminate.c')
| -rw-r--r-- | common_smp/src/tx_thread_terminate.c | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/common_smp/src/tx_thread_terminate.c b/common_smp/src/tx_thread_terminate.c index 9badb490..f84a4994 100644 --- a/common_smp/src/tx_thread_terminate.c +++ b/common_smp/src/tx_thread_terminate.c @@ -12,8 +12,8 @@ /**************************************************************************/ /**************************************************************************/ -/** */ -/** ThreadX Component */ +/** */ +/** ThreadX Component */ /** */ /** Thread */ /** */ @@ -31,48 +31,50 @@ #include "tx_timer.h" -/**************************************************************************/ -/* */ -/* FUNCTION RELEASE */ -/* */ -/* _tx_thread_terminate PORTABLE C */ +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _tx_thread_terminate PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ -/* */ -/* This function handles application thread terminate requests. Once */ -/* a thread is terminated, it cannot be executed again unless it is */ -/* deleted and recreated. */ -/* */ -/* INPUT */ -/* */ -/* thread_ptr Pointer to thread to suspend */ -/* */ -/* OUTPUT */ -/* */ -/* status Return completion status */ -/* */ -/* CALLS */ -/* */ -/* _tx_timer_system_deactivate Timer deactivate function */ -/* _tx_thread_system_suspend Actual thread suspension */ -/* _tx_thread_system_ni_suspend Non-interruptable suspend */ -/* thread */ -/* _tx_thread_system_preempt_check Check for preemption */ -/* Suspend Cleanup Routine Suspension cleanup function */ -/* */ -/* CALLED BY */ -/* */ -/* Application code */ -/* */ -/* RELEASE HISTORY */ -/* */ +/* */ +/* This function handles application thread terminate requests. Once */ +/* a thread is terminated, it cannot be executed again unless it is */ +/* deleted and recreated. */ +/* */ +/* INPUT */ +/* */ +/* thread_ptr Pointer to thread to suspend */ +/* */ +/* OUTPUT */ +/* */ +/* status Return completion status */ +/* */ +/* CALLS */ +/* */ +/* _tx_timer_system_deactivate Timer deactivate function */ +/* _tx_thread_system_suspend Actual thread suspension */ +/* _tx_thread_system_ni_suspend Non-interruptable suspend */ +/* thread */ +/* _tx_thread_system_preempt_check Check for preemption */ +/* Suspend Cleanup Routine Suspension cleanup function */ +/* */ +/* 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_thread_terminate(TX_THREAD *thread_ptr) @@ -111,7 +113,7 @@ ULONG suspension_sequence; TX_RESTORE /* Return success since thread is already terminated. */ - status = TX_SUCCESS; + status = TX_SUCCESS; } /* Check the specified thread's current status. */ @@ -199,7 +201,7 @@ ULONG suspension_sequence; /* Thread state change. */ TX_THREAD_STATE_CHANGE(thread_ptr, TX_TERMINATED) - /* Set the suspending flag. This prevents the thread from being + /* Set the suspending flag. This prevents the thread from being resumed before the cleanup routine is executed. */ thread_ptr -> tx_thread_suspending = TX_TRUE; @@ -277,7 +279,7 @@ ULONG suspension_sequence; if (_tx_thread_mutex_release != TX_NULL) { - /* Yes, call the mutex release function via a function pointer that + /* Yes, call the mutex release function via a function pointer that is setup during initialization. */ (_tx_thread_mutex_release)(thread_ptr); } @@ -285,7 +287,7 @@ ULONG suspension_sequence; #ifndef TX_NOT_INTERRUPTABLE /* Disable interrupts. */ - TX_DISABLE + TX_DISABLE #endif /* Enable preemption. */ |
