]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
added worker debug function
authorAlan T. DeKok <aland@freeradius.org>
Mon, 19 Dec 2016 16:09:52 +0000 (11:09 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 19 Dec 2016 16:09:52 +0000 (11:09 -0500)
src/util/worker.c
src/util/worker.h

index 2d22b39a1e9542334df081bbe13f214bc6052dbc..c20b362b56b91987df2c2b47ca0730d254c98230 100644 (file)
@@ -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);
+
+}
index f9ea67bc1a79c4fa64b64f2af63944bfbe0afe4a..55fd6652571b4ee9e8056af3a9f5783e16d945c4 100644 (file)
@@ -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
 }