问题
I am trying to change the scheduling in Minix and want to print from /kernel/proc.c to standard output. Printf cannot be used inside kernel. I am using Minix 3.1.2.
I want to add code to
sched()
function in order to print messages to console.
How can I do that?
回答1:
Call printk(const char *fmt, ...).
来源:https://stackoverflow.com/questions/10847666/minix-print-from-kernel-to-console