mi_switch(9): update to current day
The function itself and much of the information in this page remains
relevant, but many details need to be fixed.
- Update function signatures
- Update the list of major uses of mi_switch() (it is not exhaustive)
- Document 'flags' argument and its possible values
- Document thread lock requirement for callers
- Thread runtime limits are out of scope now, no need to describe them
- Remove outdated information w.r.t. KSE, runqueue, non-preemptible kernel, etc
- Update the description of cpu_switch() and its responsibilities
PR: 149574
Reviewed by: kib
Discussed with: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38185