allow pools to push jobs to any other pool
This commit is contained in:
parent
25e20ea3bd
commit
c1f405c6e4
@ -809,9 +809,10 @@ void sys_run(i32 count, sys_job_func *func, void *sig, enum sys_pool pool_kind,
|
||||
snc_counter_add(counter, count);
|
||||
}
|
||||
struct fiber *fiber = fiber_from_id(sys_current_fiber_id());
|
||||
/* A job cannot create a job with a pool / priority than itself */
|
||||
pool_kind = clamp_i32(pool_kind, fiber->job_pool, NUM_SYS_POOLS - 1);
|
||||
priority = clamp_i32(priority, fiber->job_priority, NUM_SYS_PRIORITIES - 1);
|
||||
priority = clamp_i32(priority, fiber->job_priority, NUM_SYS_PRIORITIES - 1); /* A job cannot create a job with a higher priority than itself */
|
||||
if (pool_kind == SYS_POOL_INHERIT) {
|
||||
pool_kind = fiber->job_pool;
|
||||
}
|
||||
struct job_pool *pool = &G.job_pools[pool_kind];
|
||||
struct job_queue *queue = &pool->job_queues[priority];
|
||||
tm_lock(&queue->lock);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user