From: Alan T. DeKok Date: Mon, 19 Dec 2016 16:09:52 +0000 (-0500) Subject: added worker debug function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efcd3eb943e1eab78c272e7cb66d32308ea46f92;p=thirdparty%2Ffreeradius-server.git added worker debug function --- diff --git a/src/util/worker.c b/src/util/worker.c index 2d22b39a1e9..c20b362b56b 100644 --- a/src/util/worker.c +++ b/src/util/worker.c @@ -936,3 +936,12 @@ void worker_resume_request(REQUEST *request) } #endif +void fr_worker_debug(fr_worker_t *worker, FILE *fp) +{ + fprintf(fp, "Worker %p\n", worker); + fprintf(fp, "\tkq = %d\n", worker->kq); + fprintf(fp, "\tnum_channels = %d\n", worker->num_channels); + + fr_time_tracking_debug(&worker->tracking, fp); + +} diff --git a/src/util/worker.h b/src/util/worker.h index f9ea67bc1a7..55fd6652571 100644 --- a/src/util/worker.h +++ b/src/util/worker.h @@ -49,6 +49,7 @@ int fr_worker_kq(fr_worker_t *worker) CC_HINT(nonnull); fr_atomic_queue_t *fr_worker_control_plane(fr_worker_t *worker) CC_HINT(nonnull); void fr_worker(fr_worker_t *worker) CC_HINT(nonnull); void fr_worker_exit(fr_worker_t *worker) CC_HINT(nonnull); +void fr_worker_debug(fr_worker_t *worker, FILE *fp) CC_HINT(nonnull); #ifdef __cplusplus }