diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2019-02-11 11:38:57 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-02-11 18:49:49 +0100 |
commit | c8a65463b20c00b3fd635eb4ca97f3b53927c0f9 (patch) | |
tree | 1e11fbf6b84f7a9ea2041e116dc634ac190c3f92 /lib/thread.c | |
parent | lib: make union prefixptr C++-compatible (diff) | |
download | frr-c8a65463b20c00b3fd635eb4ca97f3b53927c0f9.tar.xz frr-c8a65463b20c00b3fd635eb4ca97f3b53927c0f9.zip |
lib: make atomic ops C++ compatible
C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use
std::atomic instead to get the headers compatible.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/thread.c')
-rw-r--r-- | lib/thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c index ae8e375a2..8c1b3ff06 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -93,7 +93,8 @@ static void cpu_record_hash_free(void *a) static void vty_out_cpu_thread_history(struct vty *vty, struct cpu_thread_history *a) { - vty_out(vty, "%5d %10lu.%03lu %9u %8lu %9lu %8lu %9lu", a->total_active, + vty_out(vty, "%5"PRIdFAST32" %10lu.%03lu %9"PRIuFAST32 + " %8lu %9lu %8lu %9lu", a->total_active, a->cpu.total / 1000, a->cpu.total % 1000, a->total_calls, a->cpu.total / a->total_calls, a->cpu.max, a->real.total / a->total_calls, a->real.max); |