Go to index, previous page, next page

printk.cc

This modules contains two low-level routines used by the kernel to print messages on the terminals.

The actual print routine has been taken from p1test.cc. Here you'll only find a description of the routines added by us.

This module exports:

unsigned int printk(char *fmt) explained below
void printhex( void *num, int newline ) explained below


Look at the header file: printk.e


Module functions:

unsigned int printk(char *fmt) This routines prints the specified string to terminal 0.
If the module is compiled definining the DEBUG symbol, the output will be redirected to terminal 1, to allow a cleaner debug.

This routine will disable interrupts while printing, and will take care of saving the old CPU status and timer value and restoring them before leaving.

void printhex( void *num, int newline ) Prints the value num using hexadecimal rappresentation.
newline is a boolean value which decides whether the routine should print a linefeed after the value or not.


Look at the code: printk.cc


Go to index, previous page, next page