+
+#if CONFIG_KERN_PRI
+/**
+ * Changes the priority of an already enqueued process.
+ *
+ * Searches and removes the process from the ready list, then uses LIST_ENQUEUE(()
+ * to insert again to fix priority.
+ *
+ * No action is performed for processes that aren't in the ready list, eg. in semaphore queues.
+ *
+ * \note Performance could be improved with a different implementation of priority list.
+ */
+INLINE void sched_reenqueue(struct Process *proc)
+{
+ IRQ_ASSERT_DISABLED();
+ LIST_ASSERT_VALID(&proc_ready_list);
+ Node *n;
+ PriNode *pos = NULL;
+ FOREACH_NODE(n, &proc_ready_list)
+ {
+ if (n == &proc->link.link)
+ {
+ pos = (PriNode *)n;
+ break;
+ }
+ }
+
+ // only remove and enqueue again if process is already in the ready list
+ // otherwise leave it alone
+ if (pos)
+ {
+ REMOVE(&proc->link.link);
+ LIST_ENQUEUE(&proc_ready_list, &proc->link);
+ }
+}
+#endif //CONFIG_KERN_PRI
+
+/* Process trampoline */
+void proc_entry(void);
+
+/* Schedule another process *without* adding the current one to the ready list. */
+void proc_switch(void);
+
+/* Immediately schedule a particular process bypassing the scheduler. */
+void proc_wakeup(Process *proc);
+
+/* Initialize a scheduler class. */
+void proc_schedInit(void);