Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:15

0001 /**
0002  * @file
0003  *
0004  * @ingroup RTEMSAPIKernelCharIO
0005  *
0006  * @brief This source file contains the implementation of printk().
0007  */
0008 
0009 /*
0010  * (C) Copyright 1997 -
0011  * - NavIST Group - Real-Time Distributed Systems and Industrial Automation
0012  *
0013  * http://pandora.ist.utl.pt
0014  *
0015  * Instituto Superior Tecnico * Lisboa * PORTUGAL
0016  *
0017  * Disclaimer:
0018  *
0019  * This file is provided "AS IS" without warranty of any kind, either
0020  * expressed or implied.
0021  *
0022  * This code is based on code by: Jose Rufino - IST
0023  */
0024 
0025 #ifdef HAVE_CONFIG_H
0026 #include "config.h"
0027 #endif
0028 
0029 #include <stdarg.h>
0030 #include <stdio.h>
0031 #include <rtems/bspIo.h>
0032 
0033 /**
0034  *  Kernel printf function requiring minimal infrastructure.
0035  */
0036 int printk(const char *fmt, ...)
0037 {
0038   va_list ap;       /* points to each unnamed argument in turn */
0039   int     len;
0040   va_start(ap, fmt); /* make ap point to 1st unnamed arg */
0041   len = vprintk(fmt, ap);
0042   va_end(ap);        /* clean up when done */
0043   return len;
0044 }