- * \note This macro is *NOT* protected against the scheduler. Access to
- * this list must be performed with interrupts disabled.
+ * \note Access to the scheduler ready list must be performed with
+ * interrupts disabled.
+ */
+#define SCHED_ENQUEUE(proc) do { \
+ IRQ_ASSERT_DISABLED(); \
+ LIST_ASSERT_VALID(&proc_ready_list); \
+ SCHED_ENQUEUE_INTERNAL(proc); \
+ } while (0)
+
+#define SCHED_ENQUEUE_HEAD(proc) do { \
+ IRQ_ASSERT_DISABLED(); \
+ LIST_ASSERT_VALID(&proc_ready_list); \
+ SCHED_ENQUEUE_HEAD_INTERNAL(proc); \
+ } while (0)
+
+
+#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.