Add support for the tracing infastructure in coreboot.
[coreboot.git] / src / console / vsprintf.c
index 090063cf6257f3e1c05f80e219e7b99ef0d6c493..435401b7efcd33aa088a4f6dc528ca747a060fbe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of the coreboot project.
- * 
+ *
  * Copyright (C) 2009 coresystems GmbH
  *
  * This program is free software; you can redistribute it and/or
  * MA 02110-1301 USA
  */
 
-#include <stdarg.h>
 #include <string.h>
 #include <smp/spinlock.h>
 #include <console/vtxprintf.h>
+#include <trace.h>
 
 DECLARE_SPIN_LOCK(vsprintf_lock)
 
@@ -38,6 +38,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
 {
        int i;
 
+       DISABLE_TRACE;
        spin_lock(&vsprintf_lock);
 
        str_buf = buf;
@@ -45,6 +46,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
        *str_buf = '\0';
 
        spin_unlock(&vsprintf_lock);
+       ENABLE_TRACE;
 
        return i;
 }