diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-20 09:45:06 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-06 20:50:58 +0000 |
| commit | 9ef9495e3a96e6d3ebcce46d716500ad396fe979 (patch) | |
| tree | c0c99bcb2e0794043c0dd824f258db458c68e5ce /lib/thread.c | |
| parent | 8b895cd32faf5a48a6c565877091ff92b6541092 (diff) | |
lib: Convert thread.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/thread.c')
| -rw-r--r-- | lib/thread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/thread.c b/lib/thread.c index 52bc79ffe6..b2740baf5d 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -33,6 +33,7 @@ #include "network.h" #include "jhash.h" #include "frratomic.h" +#include "lib_errors.h" DEFINE_MTYPE_STATIC(LIB, THREAD, "Thread") DEFINE_MTYPE_STATIC(LIB, THREAD_MASTER, "Thread master") @@ -1480,7 +1481,8 @@ struct thread *thread_fetch(struct thread_master *m, struct thread *fetch) } /* else die */ - zlog_warn("poll() error: %s", safe_strerror(errno)); + flog_err(LIB_ERR_SYSTEM_CALL, "poll() error: %s", + safe_strerror(errno)); pthread_mutex_unlock(&m->mtx); fetch = NULL; break; @@ -1617,7 +1619,8 @@ void thread_call(struct thread *thread) * Whinge about it now, so we're aware this is yet another task * to fix. */ - zlog_warn( + flog_warn( + LIB_WARN_SLOW_THREAD, "SLOW THREAD: task %s (%lx) ran for %lums (cpu time %lums)", thread->funcname, (unsigned long)thread->func, realtime / 1000, cputime / 1000); |
