diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-01-12 02:07:41 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-01-14 13:33:57 +0100 |
commit | f59e6882267bf9a5cd04dbf54f45b07c53021890 (patch) | |
tree | e2c726871a3f13af699d519ea3efb86acf8e0272 /lib/thread.h | |
parent | lib: add time formatting printfrr exts (diff) | |
download | frr-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.h | 4 |
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; |