Rename trace_printf to ts_trace_printf
trace_printf is a generic name, but is a public API of libts.
A TS specific name could help avoiding errors in the future.
Change-Id: Ic89621581ea92045435ed1b71ea0748299f56f48
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
diff --git a/components/common/trace/include/trace.h b/components/common/trace/include/trace.h
index 1495374..7e2e561 100644
--- a/components/common/trace/include/trace.h
+++ b/components/common/trace/include/trace.h
@@ -24,37 +24,37 @@
#endif /* TRACE_LEVEL */
/**
- * no_trace_printf will be optimized out becase of the 'if (0)' but all the
+ * no_ts_trace_printf will be optimized out becase of the 'if (0)' but all the
* checks will still run against the format string and the parameters.
*/
-#define no_trace_printf(func, line, level, fmt, ...) \
+#define no_ts_trace_printf(func, line, level, fmt, ...) \
do { \
if (0) { \
- trace_printf(func, line, level, fmt, ##__VA_ARGS__); \
+ ts_trace_printf(func, line, level, fmt, ##__VA_ARGS__); \
} \
} while (0)
extern void (*trace_puts_interface)(const char *str);
void trace_puts(const char *str);
TRACE_EXPORTED
-void trace_printf(const char *func, int line, int level, const char *fmt, ...) __printf(4, 5);
+void ts_trace_printf(const char *func, int line, int level, const char *fmt, ...) __printf(4, 5);
#if TRACE_LEVEL >= TRACE_LEVEL_ERROR
-#define EMSG(...) trace_printf(__func__, __LINE__, TRACE_LEVEL_ERROR, __VA_ARGS__)
+#define EMSG(...) ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_ERROR, __VA_ARGS__)
#else
-#define EMSG(...) no_trace_printf(__func__, __LINE__, TRACE_LEVEL_ERROR, __VA_ARGS__)
+#define EMSG(...) no_ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_ERROR, __VA_ARGS__)
#endif /* TRACE_LEVEL >= TRACE_LEVEL_ERROR */
#if TRACE_LEVEL >= TRACE_LEVEL_INFO
-#define IMSG(...) trace_printf(__func__, __LINE__, TRACE_LEVEL_INFO, __VA_ARGS__)
+#define IMSG(...) ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_INFO, __VA_ARGS__)
#else
-#define IMSG(...) no_trace_printf(__func__, __LINE__, TRACE_LEVEL_INFO, __VA_ARGS__)
+#define IMSG(...) no_ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_INFO, __VA_ARGS__)
#endif /* TRACE_LEVEL >= TRACE_LEVEL_INFO */
#if TRACE_LEVEL >= TRACE_LEVEL_DEBUG
-#define DMSG(...) trace_printf(__func__, __LINE__, TRACE_LEVEL_DEBUG, __VA_ARGS__)
+#define DMSG(...) ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_DEBUG, __VA_ARGS__)
#else
-#define DMSG(...) no_trace_printf(__func__, __LINE__, TRACE_LEVEL_DEBUG, __VA_ARGS__)
+#define DMSG(...) no_ts_trace_printf(__func__, __LINE__, TRACE_LEVEL_DEBUG, __VA_ARGS__)
#endif /* TRACE_LEVEL >= TRACE_LEVEL_DEBUG */
#endif /* TRACE_H_ */
diff --git a/components/common/trace/trace.c b/components/common/trace/trace.c
index 372226b..728257f 100644
--- a/components/common/trace/trace.c
+++ b/components/common/trace/trace.c
@@ -14,7 +14,7 @@
void (*trace_puts_interface)(const char *str) = &trace_puts;
-void trace_printf(const char *func, int line, int level, const char *fmt, ...)
+void ts_trace_printf(const char *func, int line, int level, const char *fmt, ...)
{
char buffer[256];
char level_char = 0;