Instead of switching to the thread contained in `ksSchedulerAction` on a `schedule` we instead decide between the 'candidate' contained in `ksSchedulerAction`, the current thread or potentially neither if the candidate is deemed invalid and the current thread is blocked. A consequence of this change is that it is no longer meaningful to have a distinction between `switchIfRequiredTo` and `attemptSwitchTo`. Now both these cases simply identify a candidate, which may or may not be picked in `schedule`. Part of the distinction of `switchIfRequiredTo` was to not avoid switching if possible when performing notifications. This is now handled by prefering the current thread over the candidate if the current thread has not blocked. This change is largely semantic preserving overall, with the exception of non-blocking synchronous sends now acting like notifications and also preferring to resume running the current thread. The motivation for this change was to make it much easier for verification to show correspondence between the fastpath changes introduced in the previous commit and the slowpath scheduler. |
||
|---|---|---|
| .. | ||
| boot.h | ||
| cspace.h | ||
| faulthandler.h | ||
| stack.h | ||
| thread.h | ||
| traps.h | ||
| vspace.h | ||