1 #include <inc/assert.h>
5 #include <kern/monitor.h>
7 // Choose a user environment to run and run it.
11 // Implement simple round-robin scheduling.
12 // Search through 'envs' for a runnable environment,
13 // in circular fashion starting after the previously running env,
14 // and switch to the first such environment found.
15 // It's OK to choose the previously running env if no other env
18 // LAB 3: Your code here.
20 // Run the special idle environment when nothing else is runnable.
21 if (envs
[0].env_status
== ENV_RUNNABLE
)
24 cprintf("Idle loop - nothing more to do!\n");