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

Marian Buschsieweke notifications at github.com
Fri Apr 9 08:38:22 CEST 2021


@maribu commented on this pull request.



> @@ -82,7 +82,7 @@ void sched_runq_callback(uint8_t prio)
     }
 
     if (_current_rr_priority == prio) {
-        if (sched_runqueue_len2(prio) == 0) {
+        if (sched_runqueue_is_empty(prio)) {

I'm pretty sure it did. I wouldn't need to consult the API doc for `sched_runqueue_is_empty()`, but I most certainly need to look up what `sched_runqueue_len2()` is.

If it would be `sched_runqueue_len(prio) == 0`, it would be equally readable. But that would come with a performance penalty.

Btw.: Have you checked the impact on ROM size? I have the feeling that not every compiler is able to optimize `sched_runqueue_len2(prio) == 0` down to the same code `sched_runqueue_is_empty(prio)` generates. If that is true, this might be a point that can convince you of using `sched_runqueue_is_empty()` here.

-- 
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_r610381333
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210408/1ddaab7e/attachment-0001.htm>


More information about the notifications mailing list