cyclic: invoke uthread_schedule() from schedule()
authorJerome Forissier <jerome.forissier@linaro.org>
Fri, 18 Apr 2025 14:09:36 +0000 (16:09 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 23 Apr 2025 19:19:44 +0000 (13:19 -0600)
Make the schedule() call from the CYCLIC framework a uthread scheduling
point too. This makes sense since schedule() is called from a lot of
places where uthread_schedule() needs to be called.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Stefan Roese <sr@denx.de>
common/cyclic.c
include/u-boot/schedule.h

index fad071a..b695f09 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/list.h>
 #include <asm/global_data.h>
 #include <u-boot/schedule.h>
+#include <uthread.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -100,6 +101,8 @@ void schedule(void)
         */
        if (gd)
                cyclic_run();
+
+       uthread_schedule();
 }
 
 int cyclic_unregister_all(void)
index 4fd34c4..4605971 100644 (file)
@@ -3,6 +3,8 @@
 #ifndef _U_BOOT_SCHEDULE_H
 #define _U_BOOT_SCHEDULE_H
 
+#include <uthread.h>
+
 #if CONFIG_IS_ENABLED(CYCLIC)
 /**
  * schedule() - Schedule all potentially waiting tasks
@@ -17,6 +19,7 @@ void schedule(void);
 
 static inline void schedule(void)
 {
+       uthread_schedule();
 }
 
 #endif