diff options
| author | toddaaro <github@opprobrio.us> | 2013-07-19 14:25:05 -0700 |
|---|---|---|
| committer | toddaaro <github@opprobrio.us> | 2013-08-01 15:14:00 -0700 |
| commit | f7eed223873a4280c9abea937e60ef1aaedf0162 (patch) | |
| tree | d1dea92a84b12741e7796cf91938edbae906fd8e /src/rt/rust_stack.cpp | |
| parent | 82b24559e6aa0914f8a49e0a9dbfb3cf35372515 (diff) | |
| download | rust-f7eed223873a4280c9abea937e60ef1aaedf0162.tar.gz rust-f7eed223873a4280c9abea937e60ef1aaedf0162.zip | |
A major refactoring that changes the way the runtime uses TLS. In the
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
Diffstat (limited to 'src/rt/rust_stack.cpp')
0 files changed, 0 insertions, 0 deletions
