anchao opened a new pull request, #21066:
URL: https://github.com/apache/nuttx/pull/21066
## Summary
Fix uninterruptible semaphore waits so the uninterruptible state is scoped
to
the waiting task instead of the semaphore object.
Previously, uninterruptible semaphore helpers marked the semaphore itself
with
an uninterruptible flag. That meant one uninterruptible wait could change
`EINTR` behavior for later normal waiters on the same semaphore.
This change introduces `TCB_FLAG_SEM_UNINTERRUPTIBLE` and tracks the
uninterruptible wait state on the current task. The uninterruptible helper
functions set the task flag for the duration of the wait and restore the
previous state before returning.
The signal and semaphore wait paths now check the task flag instead of a
semaphore-wide flag.
## Impact
This fixes incorrect signal interruption behavior when normal and
uninterruptible waiters use the same semaphore.
Expected impact:
- limits uninterruptible wait behavior to the current wait operation
- prevents later normal waiters from inheriting uninterruptible behavior
- preserves nested or pre-existing uninterruptible task state
- keeps semaphore object state independent from per-task wait behavior
- no API, ABI, build-system, documentation, or security impact is expected
## Testing
sim/nsh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]