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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user