processor: add a getter for the threads passed to set_threads()

This commit is contained in:
Martin Willi
2013-07-18 16:00:29 +02:00
parent a0e3a7363f
commit 50720d7ce9
2 changed files with 17 additions and 1 deletions
+10
View File
@@ -87,6 +87,16 @@ struct processor_t {
*/
void (*set_threads)(processor_t *this, u_int count);
/**
* Get the number of threads set with set_threads().
*
* This does not actually reflect the number of threads currently active,
* but the number of threads targeted.
*
* @return number of desired threads
*/
u_int (*get_threads)(processor_t *this);
/**
* Sets the number of threads to 0 and cancels all blocking jobs, then waits
* for all threads to be terminated.