[riot-notifications] [RIOT-OS/RIOT] tests/periph_spi: Add thread runtime stats (#14087)

Koen Zandberg notifications at github.com
Mon May 18 19:35:54 CEST 2020


@bergzand commented on this pull request.



> @@ -57,6 +61,25 @@ static struct {
     spi_cs_t cs;
 } spiconf;
 
+/*
+ * @brief Trigger an update of the scheduler runtime statistics.
+ *
+ * Increases the number of context switches by one as a side effect
+ */
+static void _sched_statistics_trigger(void)
+{
+    sched_statistics_cb(sched_active_pid, sched_active_pid);
+}
+
+static xtimer_ticks64_t _sched_ticks(void)
+{
+    _sched_statistics_trigger();
+    xtimer_ticks64_t runtime_ticks = {

I agree, it *should* be fine to change this and keeps the test suitable for the 8-bit architectures. Changed in the latest fixup commit.

-- 
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/14087#discussion_r426788928
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200518/8b5b34b4/attachment-0001.htm>


More information about the notifications mailing list