<p><b>@cladmi</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11781#discussion_r308316791">core/sched.c</a>:</p>
<pre style='color:#555'>> +#ifdef MODULE_SCHED_CB
+void sched_register_cb(void (*callback)(uint32_t, uint32_t))
+{
+    sched_cb = callback;
+}
+#endif
+
+#ifdef MODULE_SCHEDSTATISTICS
+void sched_statistics_cb(uint32_t active_thread, uint32_t next_thread) {
+
+    uint32_t now = xtimer_now().ticks32;
+
+    if((thread_getstatus(active_thread) != STATUS_STOPPED) && \
+       (thread_getstatus(active_thread) != STATUS_NOT_FOUND)) {
+        schedstat_t *active_stat = &sched_pidlist[active_thread];
+        if (active_stat->laststart) {
</pre>
<p>To change this, I think somehow require that <code>init_schedstatistics</code> calls <code>sched_statistics_cb(KERNEL_PID_UNDEF, sched_active_pid)</code> with the kept conditional, or does a manual init.</p>

<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/11781?email_source=notifications&email_token=ABE7WYGWVID2USIC7SE4UP3QB4JUZA5CNFSM4H5F36JKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7325DI#discussion_r308316791">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYGY3YVKOK6GDZYPEHLQB4JUZANCNFSM4H5F36JA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYG2TG7WLC7EUELVEMDQB4JUZA5CNFSM4H5F36JKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7325DI.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/11781?email_source=notifications\u0026email_token=ABE7WYGWVID2USIC7SE4UP3QB4JUZA5CNFSM4H5F36JKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7325DI#discussion_r308316791",
"url": "https://github.com/RIOT-OS/RIOT/pull/11781?email_source=notifications\u0026email_token=ABE7WYGWVID2USIC7SE4UP3QB4JUZA5CNFSM4H5F36JKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7325DI#discussion_r308316791",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>