Changeset f56067e in rtems-libbsd


Ignore:
Timestamp:
Sep 10, 2018, 1:07:57 PM (8 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
0f9d58f
Parents:
f7d6bd2
git-author:
Sebastian Huber <sebastian.huber@…> (09/10/18 13:07:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/10/18 13:15:42)
Message:

vprintf: Avoid printf() to avoid FPU usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-kernel-vprintf.c

    rf7d6bd2 rf56067e  
    4949#include <rtems/bsd/bsd.h>
    5050
    51 #undef printf
    52 
    5351#define VPRINTF_LOCK() _Mutex_Acquire(&vprintf_mtx)
    5452#define VPRINTF_UNLOCK() _Mutex_Release(&vprintf_mtx)
     
    8785
    8886        if (level != LOG_PRINTF) {
    89                 printf("%s: ", log_priorities[LOG_PRI(level)]);
     87                const char *p;
     88
     89                p = log_priorities[LOG_PRI(level)];
     90
     91                while (*p != '\0') {
     92                        putchar(*p);
     93                        ++p;
     94                }
     95
     96                putchar(':');
     97                putchar(' ');
    9098        }
    9199
Note: See TracChangeset for help on using the changeset viewer.