|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
Minimal libc-free tracing for freestanding binaries: write to stderr and format a decimal, with a compile-out gate. More...
#include "common/platform/sys/syscall.h"Go to the source code of this file.
Data Structures | |
| struct | wired_fmt_u64_in |
| The value to format and its minimum zero-padded width. More... | |
Macros | |
| #define | WIRED_LOG(s) |
| Trace macro: expands to a timestamped log under -DWIRED_DEBUG, nothing else. | |
Functions | |
| void | wired_fmt_u64 (char *out, usz *at, const wired_fmt_u64_in *in) |
| Write in->v as decimal into out at *at, left-padded with '0' to in->width. | |
| void | wired_log_str (const char *s) |
| Write a NUL-terminated string to stderr (fd 2). | |
| void | wired_log_ts (const char *s) |
| Write a CLOCK_REALTIME "sec.nsec " timestamp then s to stderr. | |
Minimal libc-free tracing for freestanding binaries: write to stderr and format a decimal, with a compile-out gate.
The SDK is otherwise silent, so an example/binary that wants trace output uses these rather than pulling in a print library.
| #define WIRED_LOG | ( | s | ) |
Trace macro: expands to a timestamped log under -DWIRED_DEBUG, nothing else.
| void wired_fmt_u64 | ( | char * | out, |
| usz * | at, | ||
| const wired_fmt_u64_in * | in ) |
Write in->v as decimal into out at *at, left-padded with '0' to in->width.
| out | destination character buffer (caller sizes it; a u64 needs at most 20 digits) |
| at | write cursor into out; advanced past the emitted digits |
| in | value and minimum zero-padded width |
| void wired_log_str | ( | const char * | s | ) |
Write a NUL-terminated string to stderr (fd 2).
| s | NUL-terminated string to write |
| void wired_log_ts | ( | const char * | s | ) |
Write a CLOCK_REALTIME "sec.nsec " timestamp then s to stderr.
| s | NUL-terminated string written after the timestamp |