When debugging around bthreads, it's often useful to log context
switches. Make this easier by adding a ready-to-use pr_debug at the
correct location.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/bthread.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/bthread.c b/common/bthread.c
index c811797130eb..80651344da64 100644
--- a/common/bthread.c
+++ b/common/bthread.c
@@ -163,7 +163,10 @@ void bthread_info(void)
void bthread_reschedule(void)
{
- bthread_schedule(list_next_entry(current, list));
+ struct bthread *next = list_next_entry(current, list);
+ if (current != next)
+ pr_debug("switch %s -> %s\n", current->name, next->name);
+ bthread_schedule(next);
}
void bthread_schedule(struct bthread *to)--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox