diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-14 14:54:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-14 16:56:03 +0200 |
commit | 73ebf9a27ed5cd0fd3e0dc0da98345d7faa610a2 (patch) | |
tree | ab75daf199833c984b346c856c4526e28f14d510 /cpukit/include/rtems | |
parent | rtems: Always set the real priority during restart (diff) | |
download | rtems-73ebf9a27ed5cd0fd3e0dc0da98345d7faa610a2.tar.bz2 |
rtems: Fix task restart within interrupt context
rtems_task_restart() may be called from within interrupt context. So
checking only that the thread to restart is equal to the executing
thread is insufficient to determine a self restart. We have to also
check that no ISR is in progress. Merge _Thread_Restart_other() and
_Thread_Restart_self() into one _Thread_Restart() since they share a lot
of common code.
Close #4412.
Diffstat (limited to 'cpukit/include/rtems')
-rw-r--r-- | cpukit/include/rtems/score/threadimpl.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h index 8674a3f2b3..44785cd937 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -271,19 +271,6 @@ Status_Control _Thread_Start( ); /** - * @brief Restarts the currently executing thread. - * - * @param[in, out] executing The currently executing thread. - * @param entry The start entry information for @a executing. - * @param lock_context The lock context. - */ -RTEMS_NO_RETURN void _Thread_Restart_self( - Thread_Control *executing, - const Thread_Entry_information *entry, - ISR_lock_Context *lock_context -); - -/** * @brief Restarts the thread. * * @param[in, out] the_thread is the thread to restart. @@ -296,7 +283,7 @@ RTEMS_NO_RETURN void _Thread_Restart_self( * * @retval STATUS_INCORRECT_STATE The thread was dormant. */ -Status_Control _Thread_Restart_other( +Status_Control _Thread_Restart( Thread_Control *the_thread, const Thread_Entry_information *entry, ISR_lock_Context *lock_context |