1
0

proj: Add tid to msg()

This commit is contained in:
2025-04-17 11:30:45 +02:00
parent 83ddd409a4
commit c848fa0514
2 changed files with 3 additions and 3 deletions

View File

@@ -602,7 +602,7 @@ static void msg(const char *fmt, ...) {
struct timespec spec;
clock_gettime(CLOCK_REALTIME, &spec);
size_t offset = snprintf(buf, sizeof(buf), "%li.%09li %i ", spec.tv_sec, spec.tv_nsec, getpid());
size_t offset = snprintf(buf, sizeof(buf), "%li.%09li %i %i ", spec.tv_sec, spec.tv_nsec, getpid(), gettid());
for (char ch, state = 0; (ch = *fmt) != 0 && offset < sizeof(buf); fmt++) {
if (state == '%') {
if (ch == '%') {