summaryrefslogtreecommitdiffstats
path: root/src/include/console/vtxprintf.h
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2013-11-26 21:43:05 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2013-12-07 19:27:34 +0100
commitf421b33edb78890f8721de49c1dd1e086f1d25fc (patch)
tree0ee692e79c5772be1d2fcfac8fb43476cc6ea2d3 /src/include/console/vtxprintf.h
parent7f68dfd6e8d90516a25d0b7523387ea1b8704355 (diff)
downloadcoreboot-f421b33edb78890f8721de49c1dd1e086f1d25fc.tar.gz
coreboot-f421b33edb78890f8721de49c1dd1e086f1d25fc.tar.bz2
coreboot-f421b33edb78890f8721de49c1dd1e086f1d25fc.zip
vtxprintf: Introduce vtxdprintf for the ease of closures
It was suggested to eliminate the lock for sprintf. One way to do it is to make the fake tx_byte into a closure. This patch allows it. It's a bit tricky since we need to preserve compatibility with romcc. Change-Id: I877ef0cef54dcbb0589fe858c485f76f3dd27ece Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/4287 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/include/console/vtxprintf.h')
-rw-r--r--src/include/console/vtxprintf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/console/vtxprintf.h b/src/include/console/vtxprintf.h
index 2cf44de7ea2d..c5daf9d34012 100644
--- a/src/include/console/vtxprintf.h
+++ b/src/include/console/vtxprintf.h
@@ -36,4 +36,8 @@ typedef __builtin_va_list va_list;
int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args);
+#if !defined (__ROMCC__) && !defined (__SMM__)
+int vtxdprintf(void (*tx_byte)(unsigned char byte, void *data), const char *fmt, va_list args, void *data);
+#endif
+
#endif