- static int printf(const char *fmt, ...)
- {
- va_list args;
- int i;
- va_start(args, fmt);
- write(1,printbuf,i=vsprintf(printbuf, fmt, args));
- va_end(args);
- return i;
- }
Standard C libraries:
/*
* NOTE!! For any other task 'pause()' would mean we have to get a
* signal to awaken, but task0 is the sole exception (see 'schedule()')
* as task 0 gets activated at every idle moment (when no other tasks
* can run). For task0 'pause()' just means we go check if some other
* task can run, and if not we return here.
*/
for(;;) pause();
Task 0 is idle process.
The schedule( ) Function
schedule( )implements the scheduler. Its objective is to find a process in the runqueue list and then assign the CPU to it. It is invoked, directly or in a lazy way, by several kernel routines.
tty is a Unix command that prints to standard output the name of the file connected to standard input. The name of the program comes from teletypewriter, abbreviated "TTY".
Monday, January 3, 2011
printf function by Linus Torvaludus in Kernel 0.01 !
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment