summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-07-12 01:01:10 +1000
committerJake Mannens <jake72360@gmail.com>2018-07-12 01:01:10 +1000
commit778301ab212d9bb8ffa527491cbc93955eb0cb92 (patch)
treee62a2ee8180966d4fe41f80ba74f63977e51fcff /lib
parent6a6d5142d19638177c79c45d828f4b95db14799c (diff)
Task state information is no longer manually saved on context switch.
Since the kernel now has it's own stack unique to each address space, we can now rely on hardware task switching to *also* save the task states. To accomplish this, most of the code in switch_to() has been elimated. This includes; the clearing of the busy flag in the old TSS on each switch, setting the TR register to null prior to each switch and calling save_state() (which has also been removed entirely), to copy the state information. Modified the for loop in reschedule() to account for the fact that the switch_to() function may now return (which it *always* does when returning to the task). For the same reason, switch_to() must also be careful to preserve registers such as EBX and actually make a return following the far jump. Added basic definitions for task states in sched.h. These are; running, interruptible, uninterruptible, zombie and stopped. These states will (possibly) be used in the future to implement blocking system calls.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions