Rev 3149 | Rev 4348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3149 | Rev 4341 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | 60 | ||
61 | int vprintf(const char *fmt, va_list ap) |
61 | int vprintf(const char *fmt, va_list ap) |
62 | { |
62 | { |
63 | struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; |
63 | struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; |
64 | 64 | ||
65 | int irqpri = interrupts_disable(); |
65 | ipl_t ipl = interrupts_disable(); |
66 | spinlock_lock(&printf_lock); |
66 | spinlock_lock(&printf_lock); |
67 | 67 | ||
68 | int ret = printf_core(fmt, &ps, ap); |
68 | int ret = printf_core(fmt, &ps, ap); |
69 | 69 | ||
70 | spinlock_unlock(&printf_lock); |
70 | spinlock_unlock(&printf_lock); |
71 | interrupts_restore(irqpri); |
71 | interrupts_restore(ipl); |
72 | 72 | ||
73 | return ret; |
73 | return ret; |
74 | } |
74 | } |
75 | 75 | ||
76 | /** @} |
76 | /** @} |