[PATCH 3/3] score: Format changes in _Thread_Set_state()

Gedare Bloom gedare at rtems.org
Mon Nov 25 14:59:31 UTC 2013


All 3 look fine to me.

On Mon, Nov 25, 2013 at 9:32 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> ---
>  cpukit/score/src/threadsetstate.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c
> index 251275e..a0c29e2 100644
> --- a/cpukit/score/src/threadsetstate.c
> +++ b/cpukit/score/src/threadsetstate.c
> @@ -31,18 +31,18 @@ void _Thread_Set_state(
>  )
>  {
>    ISR_Level      level;
> +  States_Control current_state;
>
>    _ISR_Disable( level );
> -  if ( !_States_Is_ready( the_thread->current_state ) ) {
> -    the_thread->current_state =
> -       _States_Set( state, the_thread->current_state );
> -    _ISR_Enable( level );
> -    return;
> -  }
>
> -  the_thread->current_state = state;
> +  current_state = the_thread->current_state;
> +  if ( _States_Is_ready( current_state ) ) {
> +    the_thread->current_state = state;
>
> -  _Scheduler_Block( the_thread );
> +    _Scheduler_Block( the_thread );
> +  } else {
> +    the_thread->current_state = _States_Set( state, current_state);
> +  }
>
>    _ISR_Enable( level );
>  }
> --
> 1.7.7
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list