diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2013-11-26 21:43:05 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2013-12-07 19:27:34 +0100 |
commit | f421b33edb78890f8721de49c1dd1e086f1d25fc (patch) | |
tree | 0ee692e79c5772be1d2fcfac8fb43476cc6ea2d3 /src/include | |
parent | 7f68dfd6e8d90516a25d0b7523387ea1b8704355 (diff) |
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')
-rw-r--r-- | src/include/console/vtxprintf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/console/vtxprintf.h b/src/include/console/vtxprintf.h index 2cf44de7ea..c5daf9d340 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 |