Changeset 108bab3 in rtems


Ignore:
Timestamp:
Oct 30, 2002, 7:47:03 PM (18 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
32f1696c
Parents:
489782d4
Message:

Add vprintk function for kernel printing from routines
which have already obtained the va_list pointer.

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/bspIo.h

    r489782d4 r108bab3  
    3333 * and initialisation of the previous variable are done.
    3434 */
     35#include <stdarg.h>
     36extern void vprintk(char *fmt, va_list ap);
    3537extern void printk(char *fmt, ...);
    3638
  • cpukit/libcsupport/src/printk.c

    r489782d4 r108bab3  
    7474+--------------------------------------------------------------------------*/
    7575void
    76 printk(char *fmt, ...)
     76vprintk(char *fmt, va_list ap)
    7777{
    78   va_list  ap;      /* points to each unnamed argument in turn */
    7978  char     c, *str;
    8079  int      lflag, base, sign, width, lead;
     
    8382  /* _CPU_ISR_Disable(level); */
    8483 
    85   va_start(ap, fmt); /* make ap point to 1st unnamed arg */
    8684  for (; *fmt != '\0'; fmt++)
    8785  {
     
    144142    }
    145143  }
    146   va_end(ap); /* clean up when done */
    147144  /* _CPU_ISR_Enable(level); */
    148145
     146} /* vprintk */
     147
     148void
     149printk(char *fmt, ...)
     150{
     151  va_list  ap;      /* points to each unnamed argument in turn */
     152 
     153  va_start(ap, fmt); /* make ap point to 1st unnamed arg */
     154  vprintk(fmt, ap);
     155  va_end(ap); /* clean up when done */
    149156} /* printk */
    150157
Note: See TracChangeset for help on using the changeset viewer.