diff options
| author | Frédéric Desbiens <[email protected]> | 2026-09-10 12:06:54 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-09-10 12:06:54 -0400 |
| commit | c0aa4dbe2932bb12bb69545ff5d4945e0b019ffe (patch) | |
| tree | 55cfc6ce0d35d3c0d5e635a33c770c2e3ee314b7 /common_modules | |
| parent | 70741198e9f6831acf52257913d1bb9c7a5a2720 (diff) | |
Initialized the suspend status before the non-interruptable suspend in tx_thread_sleep, so a sleep no longer returns a stale error left over from an earlier timed-out suspension (#725)
When TX_NOT_INTERRUPTABLE is defined, _tx_thread_sleep did not set
tx_thread_suspend_status to TX_SUCCESS before calling
_tx_thread_system_ni_suspend. The interruptable path always did.
Nothing else writes that field on behalf of a sleeping thread:
_tx_thread_timeout resumes a TX_SLEEP thread directly and there is no
suspend cleanup routine for sleep. The value therefore survived from
whatever suspension the thread performed last, and tx_thread_sleep
returned it. A tx_semaphore_get that timed out with TX_NO_INSTANCE
would be followed by a tx_thread_sleep that also returned
TX_NO_INSTANCE after sleeping correctly.
The same change is applied to the SMP copy, which is identical.
Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules')
0 files changed, 0 insertions, 0 deletions
