diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-22 10:06:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-19 12:00:45 +0200 |
commit | 08fe84b5d7072b7809581b1a25954a3b221497a5 (patch) | |
tree | 79a1ea39b1ea24ca25bf9f450a726efe80dd6257 /cpukit/score/include/rtems/score/threadimpl.h | |
parent | score: Reduce thread wait states (diff) | |
download | rtems-08fe84b5d7072b7809581b1a25954a3b221497a5.tar.bz2 |
score: Generalize _Event_Timeout()
Add a thread wait timeout code. Replace _Event_Timeout() with a general
purpose _Thread_Timeout() watchdog handler.
Update #2273.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 3577a7493b..c266a9cce3 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -1257,6 +1257,28 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change( return success; } +/** + * @brief Sets the thread wait timeout code. + * + * @param[in] the_thread The thread. + * @param[in] timeout_code The new thread wait timeout code. + */ +RTEMS_INLINE_ROUTINE void _Thread_Wait_set_timeout_code( + Thread_Control *the_thread, + uint32_t timeout_code +) +{ + the_thread->Wait.timeout_code = timeout_code; +} + +/** + * @brief General purpose thread wait timeout. + * + * @param[in] id Unused. + * @param[in] arg The thread. + */ +void _Thread_Timeout( Objects_Id id, void *arg ); + RTEMS_INLINE_ROUTINE void _Thread_Debug_set_real_processor( Thread_Control *the_thread, Per_CPU_Control *cpu |