summaryrefslogtreecommitdiffstats
path: root/lib/thread.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-12 02:07:41 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-01-14 13:33:57 +0100
commitf59e6882267bf9a5cd04dbf54f45b07c53021890 (patch)
treee2c726871a3f13af699d519ea3efb86acf8e0272 /lib/thread.h
parentlib: add time formatting printfrr exts (diff)
downloadfrr-f59e6882267bf9a5cd04dbf54f45b07c53021890.tar.xz
frr-f59e6882267bf9a5cd04dbf54f45b07c53021890.zip
lib: add `%pTH` / `%pTHD` for printing thread info
Refer to docs in doc/developer for details. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--lib/thread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/thread.h b/lib/thread.h
index 39f21da11..49a70696d 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -128,6 +128,10 @@ struct thread {
pthread_mutex_t mtx; /* mutex for thread.c functions */
};
+#ifdef _FRR_ATTRIBUTE_PRINTFRR
+#pragma FRR printfrr_ext "%pTH" (struct thread *)
+#endif
+
struct cpu_thread_history {
int (*func)(struct thread *);
atomic_size_t total_cpu_warn;