[PATCH] score: Comment _Thread_queue_Surrender_sticky()

Gedare Bloom gedare at rtems.org
Tue Jun 15 14:38:05 UTC 2021


On Tue, Jun 15, 2021 at 4:30 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> The change also helps to avoid reports from static analysers since most
> callers of _Thread_queue_Make_ready_again() check the unblock status.
> ---
>  cpukit/score/src/threadqenqueue.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
> index 5e228b7190..d187e32fbc 100644
> --- a/cpukit/score/src/threadqenqueue.c
> +++ b/cpukit/score/src/threadqenqueue.c
> @@ -733,7 +733,13 @@ void _Thread_queue_Surrender_sticky(
>      queue_context
>    );
>    queue->owner = new_owner;
> -  _Thread_queue_Make_ready_again( new_owner );
> +
> +  /*
> +   * There is no need to check the unblock status, since in the corresponding
> +   * _Thread_queue_Enqueue_sticky() the thread is not blocked by the scheduler.
> +   * Instead, the thread busy waits for a change of its thread wait flags.
> +   */
> +  (void) _Thread_queue_Make_ready_again( new_owner );
>
ok

>    cpu_self = _Thread_queue_Dispatch_disable( queue_context );
>    _Thread_queue_Queue_release(
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list