1.1 --- a/stage2/tasks.c Mon Oct 03 00:39:16 2016 +0200
1.2 +++ b/stage2/tasks.c Mon Oct 03 00:40:57 2016 +0200
1.3 @@ -142,6 +142,7 @@
1.4 /* Switch the current task. */
1.5
1.6 current_task++;
1.7 - if (current_task == max_tasks) current_task = 1;
1.8 + if ((current_task == max_tasks) || !(initial_tasks[current_task - 1]))
1.9 + current_task = 1;
1.10 init_task();
1.11 }
2.1 --- a/stage2/tasks.h Mon Oct 03 00:39:16 2016 +0200
2.2 +++ b/stage2/tasks.h Mon Oct 03 00:40:57 2016 +0200
2.3 @@ -5,7 +5,7 @@
2.4
2.5 /* Provide a limit to the number of tasks (in a way that employs a constant). */
2.6
2.7 -enum { max_tasks = 3 };
2.8 +enum { max_tasks = 10 };
2.9
2.10 /* Task management functions. */
2.11