Annotation of Gnu-Mach/i386/i386at/gpl/linux/linux_printk.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Linux kernel print routine.
        !             3:  * Copyright (C) 1995 Shantanu Goel.
        !             4:  *
        !             5:  * This program is free software; you can redistribute it and/or modify
        !             6:  * it under the terms of the GNU General Public License as published by
        !             7:  * the Free Software Foundation; either version 2, or (at your option)
        !             8:  * any later version.
        !             9:  *
        !            10:  * This program is distributed in the hope that it will be useful,
        !            11:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            12:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            13:  * GNU General Public License for more details.
        !            14:  *
        !            15:  * You should have received a copy of the GNU General Public License
        !            16:  * along with this program; if not, write to the Free Software
        !            17:  * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
        !            18:  */
        !            19: 
        !            20: /*
        !            21:  *  linux/kernel/printk.c
        !            22:  *
        !            23:  *  Copyright (C) 1991, 1992  Linus Torvalds
        !            24:  */
        !            25: 
        !            26: #include <stdarg.h>
        !            27: #include <asm/system.h>
        !            28: 
        !            29: static char buf[2048];
        !            30: 
        !            31: void
        !            32: printk(char *fmt, ...)
        !            33: {
        !            34:        va_list args;
        !            35:        int i, n, flags;
        !            36:        extern void cnputc();
        !            37:        extern int linux_vsprintf(char *buf, char *fmt, ...);
        !            38: 
        !            39:        save_flags(flags);
        !            40:        cli();
        !            41:        va_start(args, fmt);
        !            42:        n = linux_vsprintf(buf, fmt, args);
        !            43:        va_end(args);
        !            44:        for (i = 0; i < n; i++)
        !            45:                cnputc(buf[i]);
        !            46:        restore_flags(flags);
        !            47: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.