[PATCH] smpschededf02: Document reset() function
Richi Dubey
richidubey at gmail.com
Tue Aug 4 12:25:53 UTC 2020
This helps. Thank you.
On Tue, Aug 4, 2020 at 3:58 PM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> ---
> testsuites/smptests/smpschededf02/init.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/testsuites/smptests/smpschededf02/init.c
> b/testsuites/smptests/smpschededf02/init.c
> index cd8895edd5..fae2d76bf3 100644
> --- a/testsuites/smptests/smpschededf02/init.c
> +++ b/testsuites/smptests/smpschededf02/init.c
> @@ -216,6 +216,12 @@ static void set_affinity(rtems_id id, uint32_t
> cpu_set_32)
> rtems_test_assert(sc == RTEMS_SUCCESSFUL);
> }
>
> +/*
> + * The goal of the reset() function is to bring back a defined initial
> system
> + * state for each test case. All tasks of the test shall be suspended.
> The
> + * idle threads shall be ordered in the scheduled chain according to the
> CPU
> + * index.
> + */
> static void reset(test_context *ctx)
> {
> rtems_status_code sc;
> @@ -236,7 +242,13 @@ static void reset(test_context *ctx)
> rtems_test_assert(sc == RTEMS_SUCCESSFUL || sc ==
> RTEMS_INCORRECT_STATE);
> }
>
> - /* Order the idle threads explicitly */
> + /*
> + * Order the idle threads explicitly. Test cases may move the idle
> threads
> + * around. We have to ensure that the idle threads are ordered
> according to
> + * the CPU index, otherwise the processor allocations cannot be
> specified for
> + * a test case. The idle threads of a scheduler have all the same
> priority,
> + * so we have to take the FIFO ordering within a priority group into
> account.
> + */
> for (i = 0; i < CPU_COUNT; ++i) {
> const Per_CPU_Control *c;
> const Thread_Control *h;
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200804/9a475ff9/attachment.html>
More information about the devel
mailing list