From fb07f730c1dd400b6d2f79a5393ff5e3cdded73e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 13 Apr 2020 19:29:35 +0200 Subject: score: Return status in _TOD_Set() Update #3949. --- cpukit/include/rtems/score/todimpl.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'cpukit/include/rtems/score/todimpl.h') diff --git a/cpukit/include/rtems/score/todimpl.h b/cpukit/include/rtems/score/todimpl.h index 5287c976f5..b54d9a950c 100644 --- a/cpukit/include/rtems/score/todimpl.h +++ b/cpukit/include/rtems/score/todimpl.h @@ -18,6 +18,7 @@ #ifndef _RTEMS_SCORE_TODIMPL_H #define _RTEMS_SCORE_TODIMPL_H +#include #include #include #include @@ -197,10 +198,10 @@ static inline void _TOD_Release( ISR_lock_Context *lock_context ) * _TOD_Acquire(). The caller must be the owner of the TOD lock. This * function will release the TOD lock. * - * @retval true on success - * @retval false on failure + * @retval STATUS_SUCCESSFUL Successful operation. + * @retval other Some error occurred. */ -bool _TOD_Set( +Status_Control _TOD_Set( const struct timespec *tod, ISR_lock_Context *lock_context ); @@ -370,7 +371,7 @@ typedef struct TOD_Hook { Chain_Node Node; /** This is the TOD action hook that is invoked. */ - bool (*handler)(TOD_Action, const struct timespec *); + Status_Control ( *handler )( TOD_Action, const struct timespec * ); } TOD_Hook; /** @@ -384,9 +385,6 @@ extern Chain_Control _TOD_Hooks; * This method is used to add a hook to the TOD action set. * * @brief hook is the action hook to register. - * - * @retval true if the hook is added. - * @retval false if the hook cannot be added. */ void _TOD_Hook_Register( TOD_Hook *hook @@ -398,9 +396,6 @@ void _TOD_Hook_Register( * This method is used to remove a hook from the TOD action set. * * @brief hook is the action hook to unregister. - * - * @retval true if the hook is unregister. - * @retval false if the hook cannot be unregister. */ void _TOD_Hook_Unregister( TOD_Hook *hook @@ -411,13 +406,13 @@ void _TOD_Hook_Unregister( * * This method is used to invoke the set of TOD action hooks. * - * @brief action is the action which triggered this run. - * @brief tod is the current tod + * @brief action The action which triggered this run. + * @brief tod The current time of day. * - * @retval true if the hooks can be run. - * @retval false if the hook cannot be run. + * @retval STATUS_SUCCESSFUL Successful operation. + * @retval other Some error occurred. */ -bool _TOD_Hook_Run( +Status_Control _TOD_Hook_Run( TOD_Action action, const struct timespec *tod ); -- cgit v1.2.3