diff options
| author | Ian M. <ian@aptel.org> | 2026-10-04 21:58:44 +0000 |
|---|---|---|
| committer | Ian M. <ian@aptel.org> | 2026-10-04 21:58:44 +0000 |
| commit | 7f21fd6b283a6b2f43b21b3d7ec7235ddb651ad5 (patch) | |
| tree | 28448346c02ac0ef2ffa78cb71562ebb4c0bcf60 | |
| parent | 90dd33afc65e6d5ffd8bad7905bd3280ebf53620 (diff) | |
atas: Add debug trace helpers
Signed-off-by: Ian M. <ian@aptel.org>
| -rw-r--r-- | head/atas/trace.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/head/atas/trace.h b/head/atas/trace.h new file mode 100644 index 0000000..a799aa5 --- /dev/null +++ b/head/atas/trace.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2026, Apollo Telephone Laboratories. + * Provided under the BSD-3 clause. + */ + +#ifndef ATAS_TRACE_H +#define ATAS_TRACE_H 1 + +#include <stdio.h> + +#if defined(ATAS_DEBUG) +#define trace_debug(fmt, ...) \ + printf("[debug]: " fmt, ##__VA_ARGS__) +#else +#define trace_debug(...) \ + ((void)0) +#endif + +#define trace_warn(fmt, ...) \ + printf("[warning]: " fmt, ##__VA_ARGS__) +#define trace_fatal(fmt, ...) \ + printf("[fatal]: " fmt, ##__VA_ARGS__) + +#endif /* !ATAS_TRACE_H */ |
