[riot-notifications] [RIOT-OS/RIOT] core/sched: add runq_callback hook and runq inspection functions (#16463)

Karl Fessel notifications at github.com
Mon May 10 16:00:17 CEST 2021

### Contribution description

This adds a runqueue callback to core/sched that is called on changes to runqueue if they are active or their last thread is removed. (callbacks are issued when: a runqueue gets active, the active runqueue grows or a runqueue is emptied)

This also adds functions to gather informations about the length of runqueues. (empty, one thread, more than one thread)

Both features together may be used to implement schedulers that are able to adapt to demand (active if required, inactive if not)

### Testing procedure

none yet but testing #16126

### Issues/PRs references

#16311 added the required interface to change threads by advancing the runqueue

this is derived from #16126 which also adds a matching round robin scheduler

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * core/sched: add runq_callback hook and runq inspection functions

-- File Changes --

    M core/include/sched.h (56)
    M core/sched.c (17)
    M makefiles/pseudomodules.inc.mk (1)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210510/ac82322d/attachment.htm>

More information about the notifications mailing list