Ignore:
File:
1 edited

Legend:

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

    r28a5ebd r90dd8aee  
    3333 */
    3434
     35#include <arch/asm.h>
     36#include <console/console.h>
    3537#include <print.h>
    3638#include <printf/printf_core.h>
    3739#include <putchar.h>
     40#include <str.h>
    3841#include <synch/spinlock.h>
    39 #include <arch/asm.h>
    4042#include <typedefs.h>
    41 #include <str.h>
    4243
    4344static int vprintf_str_write(const char *str, size_t size, void *data)
     
    7475        char32_t uc;
    7576
     77        console_lock();
     78
    7679        while ((uc = str_decode(str, &offset, STR_NO_LIMIT)) != 0) {
    7780                putuchar(uc);
     
    8083
    8184        putuchar('\n');
     85
     86        console_unlock();
    8287        return chars;
    8388}
     
    9196        };
    9297
    93         return printf_core(fmt, &ps, ap);
     98        console_lock();
     99        int ret = printf_core(fmt, &ps, ap);
     100        console_unlock();
     101        return ret;
    94102}
    95103
Note: See TracChangeset for help on using the changeset viewer.