#4412 closed defect (fixed)
Unexpected rtems_task_restart() behaviour if called from within interrrupt context
Reported by: | Sebastian Huber | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 6.1 |
Component: | rtems | Version: | 6 |
Severity: | normal | Keywords: | qualification |
Cc: | Blocked By: | ||
Blocking: |
Description
In rtems_task_restart() there is a check if the executing thread is restarted. However, in interrupt context, this simple check results in an internal error INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL if the executing thread is restarted. Check also if an ISR is in progress to make sure the thread restart works within interrupt context.
Change History (5)
comment:1 Changed on 05/14/21 at 13:01:36 by Joel Sherrill
comment:2 Changed on 05/14/21 at 13:08:57 by Sebastian Huber
The rtems_task_restart() works well if called from within interrupt context if you use _ISR_Is_in_progress() to determine a self restart. This directive doesn't use a mutex internally only ISR locks.
comment:3 Changed on 05/14/21 at 15:05:31 by Sebastian Huber <sebastian.huber@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In [changeset:"73ebf9a27ed5cd0fd3e0dc0da98345d7faa610a2/rtems" 73ebf9a/rtems]:
comment:4 Changed on 05/26/21 at 12:41:27 by Sebastian Huber <sebastian.huber@…>
In [changeset:"de694b753ca11136adce7600d55642695c8ef39d/rtems" de694b75/rtems]:
comment:5 Changed on 06/23/21 at 07:07:55 by Sebastian Huber
Keywords: | qualification added |
---|
This service is not documented as being allowed from an ISR. Only task suspend and resume are documented as allowed. I assume by "works" you mean that it returns an error without an internal error.