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
+7 -1
View File
@@ -437,6 +437,12 @@ METHOD(processor_t, set_threads, void,
this->mutex->unlock(this->mutex);
}
METHOD(processor_t, get_threads, u_int,
private_processor_t *this)
{
return this->desired_threads;
}
METHOD(processor_t, cancel, void,
private_processor_t *this)
{
@@ -507,6 +513,7 @@ processor_t *processor_create()
.get_job_load = _get_job_load,
.queue_job = _queue_job,
.set_threads = _set_threads,
.get_threads = _get_threads,
.cancel = _cancel,
.destroy = _destroy,
},
@@ -525,4 +532,3 @@ processor_t *processor_create()
return &this->public;
}