Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!395Make the expected number of tasks per cell a parameter.
...@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment