From 877fdcf0b89a9eb242f5eb8a0615e449154e6765 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 4 May 2011 15:32:31 +0200 Subject: Count number of threads active in each class, and reserve threads only if none active --- src/libstrongswan/processing/processor.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/libstrongswan/processing/processor.h') diff --git a/src/libstrongswan/processing/processor.h b/src/libstrongswan/processing/processor.h index 9b722b5dc..5db42c04c 100644 --- a/src/libstrongswan/processing/processor.h +++ b/src/libstrongswan/processing/processor.h @@ -42,12 +42,20 @@ struct processor_t { u_int (*get_total_threads) (processor_t *this); /** - * Get the number of threads currently waiting. + * Get the number of threads currently waiting for work. * * @return number of idle threads */ u_int (*get_idle_threads) (processor_t *this); + /** + * Get the number of threads currently working, per priority class. + * + * @param prioritiy to check + * @return number of threads in priority working + */ + u_int (*get_working_threads)(processor_t *this, job_priority_t prio); + /** * Get the number of queued jobs for a specified priority. * -- cgit v1.2.3