summaryrefslogtreecommitdiff
path: root/common/src/tx_queue_cleanup.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-06-08 10:01:32 +0200
committerGitHub <[email protected]>2026-06-08 10:01:32 +0200
commit87ab09cce305eb9cd4aacac4e8c62af72f665bff (patch)
treedd062ebbea5235d1921c64b396bf7e4ce79e9e15 /common/src/tx_queue_cleanup.c
parent9ab0cf9683f832cdb48e2099533a5b06a3afcd64 (diff)
parent730b61874bc5cf40768987605ae5187fde0fa1e2 (diff)
Merge pull request #544 from eclipse-threadx/devv6.5.1.202602_rel
Merging changes for the v.6.5.1.202602 release
Diffstat (limited to 'common/src/tx_queue_cleanup.c')
-rw-r--r--common/src/tx_queue_cleanup.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/src/tx_queue_cleanup.c b/common/src/tx_queue_cleanup.c
index 05a423b3..90607183 100644
--- a/common/src/tx_queue_cleanup.c
+++ b/common/src/tx_queue_cleanup.c
@@ -109,6 +109,19 @@ TX_THREAD *previous_thread;
{
#else
+ /* TX_NOT_INTERRUPTABLE path: the revalidation guards present in the
+ interruptable path above (cleanup pointer, suspension sequence, NULL
+ queue pointer, queue ID, and suspended count checks) are intentionally
+ omitted here. Those guards exist to handle the race window that opens
+ when the interruptable path calls TX_RESTORE before invoking cleanup,
+ allowing another context to service or abort the suspension in between.
+ In TX_NOT_INTERRUPTABLE mode the caller keeps interrupts disabled across
+ the entire cleanup call, so that race window never exists. Additionally,
+ every path that resumes a suspended thread (tx_queue_send, tx_queue_receive,
+ tx_queue_flush, tx_queue_delete) clears tx_thread_suspend_cleanup before
+ calling _tx_thread_system_ni_resume, making a double-cleanup impossible
+ under the NI serialisation guarantee. */
+
/* Setup pointer to queue control block. */
queue_ptr = TX_VOID_TO_QUEUE_POINTER_CONVERT(thread_ptr -> tx_thread_suspend_control_block);
#endif