Count number of threads active in each class, and reserve threads only if none active

This commit is contained in:
Martin Willi
2011-05-16 15:24:14 +02:00
parent a694b481ee
commit 877fdcf0b8
2 changed files with 66 additions and 17 deletions
+9 -1
View File
@@ -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.
*