From 3cef3198a560d2c9e16afb81f97e05bdc6f13a01 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 17 May 2021 14:46:02 +0200 Subject: score: Simplify calling _Thread_Exit() Move common code into _Thread_Exit(). This enables a tail call optimization in most cases. --- cpukit/include/rtems/score/threadimpl.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cpukit/include/rtems/score/threadimpl.h') diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h index 1a5e391677..ecc8eee058 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -339,14 +339,13 @@ void _Thread_Kill_zombies( void ); /** * @brief Exits the currently executing thread. * - * @param[in, out] executing The currently executing thread. - * @param life_states_to_set The states to set. - * @param[out] exit_value Contains the exit value of the thread. + * @param exit_value is the exit value of the thread. + * + * @param life_states_to_set are the thread life states to set. */ -void _Thread_Exit( - Thread_Control *executing, - Thread_Life_state life_states_to_set, - void *exit_value +RTEMS_NO_RETURN void _Thread_Exit( + void *exit_value, + Thread_Life_state life_states_to_set ); /** -- cgit v1.2.3