On Fri, Feb 14, 2025 at 03:00:25PM +0100, Jerome Forissier wrote:
> Test uthread scheduling.
> 
> Signed-off-by: Jerome Forissier <jerome.foriss...@linaro.org>
> ---
>  lib/uthread.c      |  3 ++-
>  test/lib/Makefile  |  1 +
>  test/lib/uthread.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 61 insertions(+), 1 deletion(-)
>  create mode 100644 test/lib/uthread.c
> 
> diff --git a/lib/uthread.c b/lib/uthread.c
> index bb132001fb6..1f8e6d0fa80 100644
> --- a/lib/uthread.c
> +++ b/lib/uthread.c
> @@ -76,10 +76,11 @@ err:
>  
>  void uthread_free_all(void)
>  {
> +     struct uthread *main = &main_thread;
>       struct uthread *next;
>       struct uthread *tmp;
>  
> -     list_for_each_entry_safe(next, tmp, &current->list, list) {
> +     list_for_each_entry_safe(next, tmp, &main->list, list) {
>               list_del(&next->list);
>               uthread_free(next);
>       }

I think this should belong to the sixth patch.

> diff --git a/test/lib/Makefile b/test/lib/Makefile
> index bf04685dae1..c991dff1c63 100644
> --- a/test/lib/Makefile
> +++ b/test/lib/Makefile
> ...

Best regards,
Yao Zi

Reply via email to