00001
00006 #include <stdarg.h>
00007 #include <stdio.h>
00008 #include <core/stats.h>
00009 #include <xcalls/xcalls.h>
00010
00011
00023 int
00024 XCALL_DEF(x_printf)(const char *format, ...)
00025 {
00026 char buf[512];
00027 va_list ap;
00028 int len;
00029 ssize_t ret;
00030 txc_tx_t *txd;
00031
00032 txd = txc_tx_get_txd();
00033
00034 va_start (ap, format);
00035 len = vsprintf(buf, format, ap);
00036 va_end (ap);
00037 ret = _XCALL(x_write_pipe)(1, buf, len, NULL);
00038 txc_stats_txstat_increment(txd, XCALL, x_printf, 1);
00039 return ret;
00040 }