processor: add an execute_job() method to directly execute an important job

If all worker threads are busy and waiting for an event, we must ensure that
a job delivering that event gets executed. This new method has this property
for CRITICAL jobs, using a worker if we have one, but executing the job directly
if not.
This commit is contained in:
Martin Willi
2013-07-18 16:00:31 +02:00
parent 55240835b0
commit 6653e6c13e
2 changed files with 36 additions and 0 deletions
+10
View File
@@ -74,6 +74,16 @@ struct processor_t {
*/
void (*queue_job) (processor_t *this, job_t *job);
/**
* Directly execute a job with an idle worker thread.
*
* If no idle thread is available, the job gets executed by the calling
* thread.
*
* @param job job, gets destroyed
*/
void (*execute_job)(processor_t *this, job_t *job);
/**
* Set the number of threads to use in the processor.
*