1

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?

Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
user985409
  • 1,355
  • 3
  • 9
  • 18

1 Answers1

1

Call printk(const char *fmt, ...).

Philip Kendall
  • 4,304
  • 1
  • 23
  • 42
  • i have tried that and during kernel compilation it fails showing Undefined: _printk – user985409 Jun 01 '12 at 09:56
  • printk was disabled as of minix 2.0.3. Instead a file /usr/src/lib/libsys/kprintf.c redefines printf("text", ...) which should work from proc.c but doesn't. – Ken W Oct 25 '13 at 23:34