diff options
Diffstat (limited to 'common_smp')
| -rw-r--r-- | common_smp/inc/tx_api.h | 7 | ||||
| -rw-r--r-- | common_smp/src/tx_thread_wait_abort.c | 30 |
2 files changed, 25 insertions, 12 deletions
diff --git a/common_smp/inc/tx_api.h b/common_smp/inc/tx_api.h index ba2ba0a7..568d48c9 100644 --- a/common_smp/inc/tx_api.h +++ b/common_smp/inc/tx_api.h @@ -26,7 +26,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* tx_api.h PORTABLE SMP */ -/* 6.2.0 */ +/* 6.2.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -82,6 +82,9 @@ /* add extension macros, */ /* update version numbers, */ /* resulting in version 6.2.0 */ +/* 03-08-2023 Tiejun Zhou Modified comment(s), */ +/* update patch number, */ +/* resulting in version 6.2.1 */ /* */ /**************************************************************************/ @@ -134,7 +137,7 @@ extern "C" { #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 #define THREADX_MINOR_VERSION 2 -#define THREADX_PATCH_VERSION 0 +#define THREADX_PATCH_VERSION 1 /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX diff --git a/common_smp/src/tx_thread_wait_abort.c b/common_smp/src/tx_thread_wait_abort.c index e5fbffae..9c3b268f 100644 --- a/common_smp/src/tx_thread_wait_abort.c +++ b/common_smp/src/tx_thread_wait_abort.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_thread_wait_abort PORTABLE C */ -/* 6.1 */ +/* 6.2.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -68,9 +68,12 @@ /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 05-19-2020 William E. Lamie Initial Version 6.0 */ -/* 09-30-2020 Yuxin Zhou Modified comment(s), */ +/* 05-19-2020 William E. Lamie Initial Version 6.0 */ +/* 09-30-2020 Yuxin Zhou Modified comment(s), */ /* resulting in version 6.1 */ +/* 03-08-2023 Scott Larson Check if thread is coming out */ +/* of suspension elsewhere, */ +/* resulting in version 6.2.1 */ /* */ /**************************************************************************/ UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr) @@ -132,6 +135,18 @@ ULONG suspension_sequence; TX_RESTORE #endif } + else if(thread_ptr -> tx_thread_suspend_cleanup == TX_NULL) + { + /* Thread is coming out of suspension elsewhere. */ + +#ifndef TX_NOT_INTERRUPTABLE + /* Increment the disable preemption flag. */ + _tx_thread_preempt_disable++; + + /* Restore interrupts. */ + TX_RESTORE +#endif + } else { @@ -167,13 +182,8 @@ ULONG suspension_sequence; TX_RESTORE #endif - /* Call any cleanup routines. */ - if (suspend_cleanup != TX_NULL) - { - - /* Yes, there is a function to call. */ - (suspend_cleanup)(thread_ptr, suspension_sequence); - } + /* Call cleanup routine. */ + (suspend_cleanup)(thread_ptr, suspension_sequence); } /* If the abort of the thread wait was successful, if so resume the thread. */ |
