Commit 2bdeb8c3 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Report the number of tasks in use when the overflow happened

parent 7500cfc0
...@@ -772,8 +772,8 @@ struct task *scheduler_addtask(struct scheduler *s, enum task_types type, ...@@ -772,8 +772,8 @@ struct task *scheduler_addtask(struct scheduler *s, enum task_types type,
const int ind = atomic_inc(&s->tasks_next); const int ind = atomic_inc(&s->tasks_next);
/* Overflow? */ /* Overflow? */
if (ind >= s->size) error("Task list overflow. Need to increase " if (ind >= s->size) error("Task list overflow (%d). Need to increase "
"Scheduler:tasks_per_cell."); "Scheduler:tasks_per_cell.", ind);
/* Get a pointer to the new task. */ /* Get a pointer to the new task. */
struct task *t = &s->tasks[ind]; struct task *t = &s->tasks[ind];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment