[riot-notifications] [RIOT-OS/RIOT] sys/sched_rr: Add a round robin scheduler module (#16126)

Karl Fessel notifications at github.com
Thu Apr 8 17:55:04 CEST 2021


@kfessel commented on this pull request.



> + * @param[in]   prio      the priority of the runqueue to get the length from
+ * @returns     number of threads in a runqueue up to 2
+ * @retval 0    The runqueue is empty
+ * @retval 1    There is exactly one thread in the runqueue
+ * @retval 2    There are at least two threads in the runqueue
+ *
+ * @warning This API is not intended for out of tree users.
+ *          Breaking API changes will be done without notice and
+ *          without deprecation. Consider yourself warned!
+ */
+static inline uint_fast8_t sched_runqueue_len2(uint8_t prio)
+{
+    uint_fast8_t c = 0;
+
+    if (sched_runqueues[prio].next) {
+        ++c;

k, i change that or implement the clist_is_empty, clist_is_len_1, clist_longer_than_1 function.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16126#discussion_r609849718
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210408/0830ae70/attachment.htm>


More information about the notifications mailing list