[PATCH] smpschededf02: Document reset() function

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Aug 5 04:54:15 UTC 2020


On 04/08/2020 16:23, Richi Dubey wrote:
> Thanks.
> 
> So for the code:
> --------------------------------------------------------------------------------------------------
>    for (i = 0; i < CPU_COUNT; ++i) {
>      const Per_CPU_Control *c;
>      const Thread_Control *h;
> 
>      c = _Per_CPU_Get_by_index(CPU_COUNT - 1 - i);
>      h = c->heir;
> 
>      sc = rtems_task_suspend(h->Object.id);
>      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
>    }
> --------------------------------------------------------------------------------------------------
>   would it have the same effect if we replace all this by :
> 
>    for (i = CPU_COUNT -1 ; i >=0 ; --i) {
>      sc = rtems_task_suspend(ctx->task_ids[i]);
>      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
>    }
> --------------------------------------------------------------------------------------------------
> 
> Please let me know.

No, it would not have the same effect in general. You can try to change 
it and see if the test fails or not.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list