<h3>Contribution description</h3>
<p>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)</p>
<p>This also adds functions to gather informations about the length of runqueues. (empty, one thread, more than one thread)</p>
<p>Both features together may be used to implement schedulers that are able to adapt to demand (active if required, inactive if not)</p>
<h3>Testing procedure</h3>
<p>none yet but testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="820160288" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16126" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/16126/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/16126">#16126</a></p>
<h3>Issues/PRs references</h3>
<p><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="855363845" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16311" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/16311/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/16311">#16311</a> added the required interface to change threads by advancing the runqueue</p>
<p>this is derived from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="820160288" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16126" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/16126/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/16126">#16126</a> which also adds a matching round robin scheduler</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/16463'>https://github.com/RIOT-OS/RIOT/pull/16463</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>core/sched: add runq_callback hook and runq inspection functions</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16463/files#diff-2ca01a325111fe84adb41a551530813506b0e34487598e4e75ce640573ca7c35">core/include/sched.h</a>
    (56)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16463/files#diff-dc9ca9fece1c15e5b84889e11f7610b12783e5744b7bfecdcd82c4a2f87d2b6c">core/sched.c</a>
    (17)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16463/files#diff-d2e4f5b2cddc5eddb20e42bf88b7b16085ba4599fab8081e6f6168f60e12fedb">makefiles/pseudomodules.inc.mk</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16463.patch'>https://github.com/RIOT-OS/RIOT/pull/16463.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16463.diff'>https://github.com/RIOT-OS/RIOT/pull/16463.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16463">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBHQNFCAXOGQKQHZETTM7RHDANCNFSM44RIWBOQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYCAVGKWIBXFM36TXD3TM7RHDA5CNFSM44RIWBO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4NFVGFMQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16463",
"url": "https://github.com/RIOT-OS/RIOT/pull/16463",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>