/trunk/uspace/libc/generic/io/vprintf.c |
---|
36,10 → 36,7 |
#include <stdio.h> |
#include <unistd.h> |
#include <io/printf_core.h> |
#include <futex.h> |
atomic_t printf_futex = FUTEX_INITIALIZER; |
static int vprintf_write(const char *str, size_t count, void *unused) |
{ |
return write(1, str, count); |
54,9 → 51,7 |
{ |
struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; |
futex_down(&printf_futex); |
int ret = printf_core(fmt, &ps, ap); |
futex_up(&printf_futex); |
return ret; |
} |