From f421b33edb78890f8721de49c1dd1e086f1d25fc Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 26 Nov 2013 21:43:05 +0100 Subject: 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 Reviewed-on: http://review.coreboot.org/4287 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/include/console/vtxprintf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include/console') 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 -- cgit v1.2.3