summaryrefslogtreecommitdiff
path: root/include/u-boot/schedule.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/u-boot/schedule.h')
-rw-r--r--include/u-boot/schedule.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/u-boot/schedule.h b/include/u-boot/schedule.h
new file mode 100644
index 00000000000..4605971fdcb
--- /dev/null
+++ b/include/u-boot/schedule.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef _U_BOOT_SCHEDULE_H
+#define _U_BOOT_SCHEDULE_H
+
+#include <uthread.h>
+
+#if CONFIG_IS_ENABLED(CYCLIC)
+/**
+ * schedule() - Schedule all potentially waiting tasks
+ *
+ * Run all pending tasks registered via the cyclic framework, and
+ * potentially perform other actions that need to be done
+ * periodically.
+ */
+void schedule(void);
+
+#else
+
+static inline void schedule(void)
+{
+ uthread_schedule();
+}
+
+#endif
+
+#endif