Ignore:
Timestamp:
2007-04-07T17:57:07Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3dbe2d1f
Parents:
be66dee
Message:

use spinlock only on console output, not other print functions
cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/printf/printf_core.c

    rbe66dee r5b303ba  
    3939#include <putchar.h>
    4040#include <print.h>
    41 #include <synch/spinlock.h>
    4241#include <arch/arg.h>
    43 #include <arch/asm.h>
    44 
    4542#include <arch.h>
    46 
    47 SPINLOCK_INITIALIZE(printflock);                        /**< printf spinlock */
    4843
    4944#define __PRINTF_FLAG_PREFIX            0x00000001      /**< show prefixes 0x or 0*/
     
    459454int printf_core(const char *fmt, struct printf_spec *ps, va_list ap)
    460455{
    461         int irqpri;
    462456        int i = 0, j = 0; /**< i is index of currently processed char from fmt, j is index to the first not printed nonformating character */
    463457        int end;
     
    473467       
    474468        counter = 0;
    475        
    476         irqpri = interrupts_disable();
    477         spinlock_lock(&printflock);
    478 
     469               
    479470        while ((c = fmt[i])) {
    480471                /* control character */
     
    713704
    714705out:
    715         spinlock_unlock(&printflock);
    716         interrupts_restore(irqpri);
    717706       
    718707        return counter;
Note: See TracChangeset for help on using the changeset viewer.