[riot-notifications] [RIOT-OS/RIOT] core/schedstatistics: fix call to uninitialized xtimer (#11781)

Alexandre Abadie notifications at github.com
Tue Sep 10 16:35:44 CEST 2019


aabadie commented on this pull request.



> @@ -221,3 +205,37 @@ NORETURN void sched_task_exit(void)
     sched_active_thread = NULL;
     cpu_switch_context_exit();
 }
+
+#ifdef MODULE_SCHED_CB
+void sched_register_cb(void (*callback)(kernel_pid_t, kernel_pid_t))
+{
+    sched_cb = callback;
+}
+#endif
+
+#ifdef MODULE_SCHEDSTATISTICS
+void sched_statistics_cb(kernel_pid_t active_thread, kernel_pid_t next_thread)
+{
+    uint32_t now = xtimer_now().ticks32;
+
+    /* Update active thread runtime, there is allways an active thread since

typo: al**l**ways

-- 
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/11781#pullrequestreview-286201468
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190910/617e0c2e/attachment.htm>


More information about the notifications mailing list