summaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authorTiejun Zhou <[email protected]>2023-03-08 08:26:22 +0000
committerTiejun Zhou <[email protected]>2023-03-08 08:26:22 +0000
commit2aa19f3de0b6cf09bb9dca78c8a53fe337b8f0f7 (patch)
tree8ec91a64e0831e3100a6ad9a5dec41d9fd7fc74f /common/src
parent745395d6a2f931c85c4428425db21eb7d03b4324 (diff)
Release 6.2.1 on 08 Mar 2023. Expand to see details.v6.2.1_rel
cee19603d Include tx_user.h conditionally. e40e08007 Update owners d69641273 Update release date and version 394aee52f Add tx_user.h to GNU port assembly files 5cca2ddd0 RISC-V 64 bit port for Microchip e0f2c373c Link Winmm.lib that required by the high-resolution timer. 6af472a68 Update Win32 port with high resolution timer. aea7b556a Add DMB ISH barrier inst in ARMv8-A SMP scheduler 19091a262 Add .section .preamble to m3 m4 m7 module ports ced60e1b7 Add missing parenthesis in ports assembly file 309dc77ca Modules Cortex-A7 IAR new port c752a4063 Modules Cortex-A7 GNU new port dc224b90f Fix race condition in tx_thread_wait_abort and update regression test 6e261f5b7 create threadx cmsis-pack
Diffstat (limited to 'common/src')
-rw-r--r--common/src/tx_thread_wait_abort.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/common/src/tx_thread_wait_abort.c b/common/src/tx_thread_wait_abort.c
index e5fbffae..9c3b268f 100644
--- a/common/src/tx_thread_wait_abort.c
+++ b/common/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. */