Commit Graph

221 Commits

Author SHA1 Message Date
Brian Anderson d493438c98 rt: Disable some expensive asserts 2012-02-09 22:58:40 -08:00
Brian Anderson d90a9d3da0 rt: Inline everything on the C-stack-switching path 2012-02-09 22:15:15 -08:00
Brian Anderson 8ad9cf8087 rt: Add more stack-switching commentary 2012-02-09 19:00:16 -08:00
Brian Anderson 5d2442d89c rt: Add upcall_call_shim_on_rust_stack 2012-02-09 19:00:16 -08:00
Brian Anderson 79b1563abb rt: Use rust_task_thread's C-stack pool for native calls 2012-02-09 19:00:16 -08:00
Brian Anderson 8fe506bdca rt: Move more setup code into create_stack 2012-02-09 19:00:16 -08:00
Brian Anderson ea76d3f454 rt: Add rust_task::call_on_c_stack 2012-02-09 19:00:16 -08:00
Brian Anderson 1e2fe4ab8f rt: Rename call_shim_on_c_stack to call_and_change_stacks 2012-02-09 19:00:15 -08:00
Brian Anderson ae8ea4a78b rt: Add constructors and destructors for stacks 2012-02-09 19:00:15 -08:00
Brian Anderson b98df86c09 rt: Move some stack manipulation functions into rust_task 2012-02-09 19:00:15 -08:00
Brian Anderson 4bd8f8d936 rt: Rename new_stack to next_stack, del_stack to prev_stack 2012-02-09 19:00:15 -08:00
Brian Anderson 889a783494 rt: Remove rust_task::rust_sp 2012-02-09 19:00:15 -08:00
Brian Anderson d39ea47746 rt: Remove rust_task_user struct 2012-02-09 19:00:15 -08:00
Brian Anderson d756b01619 rt: Add a function for configuring task notification 2012-02-09 19:00:15 -08:00
Brian Anderson e0d5b92b84 rt: Begin moving stack-building functions to rust_stack.cpp 2012-02-09 19:00:15 -08:00
Brian Anderson 028af5cb6c rt: Change the lifecycle of tasks and schedulers for various reasons
This is in preparation for giving schedulers their own life cycle separate
from the kernel.

Tasks must be deleted before their scheduler thread, so we can't let the
scheduler exit before all its tasks have been cleaned up. In this scheme,
the scheduler will unregister tasks with the kernel when they are reaped,
then drop their ref on the task (there may still be others). When the task
ref count hits zero, the task will request to be unregistered from the
scheduler, which is responsible for deleting the task.

Instead of having the kernel tell the scheduler to exit, let the scheduler
decide when to exit. For now it will exit when all of its tasks are
unregistered.
2012-02-08 15:42:51 -08:00
Brian Anderson c7777f4fd9 rt: Add sanity checks when we hit the max task/port id 2012-02-03 23:48:12 -08:00
Brian Anderson 12fa90888e rt: Clean up the way the kernel tracks tasks 2012-02-03 23:48:12 -08:00
Brian Anderson 3d0e7a7af3 rt: Add a field to rust_task to hold its scheduler 2012-02-03 23:48:12 -08:00
Brian Anderson f94339cc1c rt: Rename rust_scheduler to rust_task_thread 2012-02-03 23:48:12 -08:00
Marijn Haverbeke c1b075d042 Remove experimental GC code
It's been sitting unused long enough to have bitrotted completely.
2012-02-03 11:34:12 +01:00
Brian Anderson 5c3c8d454d rt: Do all signalling while holding a lock
This will matter once the scheduler is changed to not wake up on a timer
2012-02-02 18:10:24 -08:00
Brian Anderson 3978fbff8b rt: Remove rust_task::can_schedule. Does nothing 2012-02-02 18:10:24 -08:00
Brian Anderson ed3a5ad5ad rt: Remove running_on flag. Does nothing 2012-02-02 18:10:24 -08:00
Brian Anderson 57cad61353 rt: Remove task pinning. Does nothing 2012-02-02 18:10:24 -08:00
Brian Anderson 18de0f2aeb rt: Rename task_sleep intrinsic to task_yield. Remove usec param 2012-02-02 18:10:24 -08:00
Brian Anderson 8693fcc2d7 rt: Remove yield timers 2012-02-02 18:10:24 -08:00
Niko Matsakis 196d69beb2 make boxes self-describing (fixes #1493)" (take 2)
this will be used to generate a new snapshot.
2012-02-01 18:52:08 -08:00
Niko Matsakis 3116643806 Revert "make boxes self-describing (fixes #1493)" until a new
snapshot is prepared.
2012-02-01 18:50:19 -08:00
Niko Matsakis c36207bfb8 make boxes self-describing (fixes #1493) 2012-02-01 18:18:07 -08:00
Brian Anderson 4eb92d4177 rt: Don't access fields on null supervisor task 2012-02-01 16:46:11 -08:00
Brian Anderson fa13fd9d64 rt: Remove set_min_stack 2012-01-29 21:27:37 -08:00
Brian Anderson 6548cdd59b rt: Make the initial segment of the main task's stack 1MB
This is a trick to fool microbenchmarks. Closes #1681
2012-01-29 21:20:39 -08:00
Brian Anderson 94c389a25b rt: Add RUST_MAX_STACK env var with 8MB default
Closes #1489
2012-01-11 13:57:11 -08:00
Niko Matsakis 110c3ccdca add rust_task_is_unwinding predicate and do not kill if already unwinding 2012-01-09 19:53:32 -08:00
Brian Anderson 7e8974305c rt: Set Linux red zone to 20K again
With runtime logging on it smashes the stack
2012-01-09 11:44:36 -08:00
Niko Matsakis 8506241f3a fix how we walk functions to match new closure fmt 2012-01-06 22:40:31 -08:00
Niko Matsakis 25e81e34ea rewrite task tests 2012-01-06 22:40:31 -08:00
Niko Matsakis 98f5109cde simplify task impl 2012-01-06 22:40:31 -08:00
Brian Anderson 4632358cbc Revert "rt: Reduce mac red zone to 6K"
This reverts commit d499e739a1.
2012-01-06 18:16:19 -08:00
Brian Anderson d499e739a1 rt: Reduce mac red zone to 6K 2012-01-06 16:42:26 -08:00
Brian Anderson 2f4c9315af rt: Fail the scheduler immediately on task failure in win32 2012-01-06 16:18:56 -08:00
User Jyyou a59c4b1b47 freebsd support 2012-01-01 20:18:55 -08:00
Brian Anderson dedfef4c4c Revert "wip"
This reverts commit aeadc6269e.
2011-12-20 20:57:04 -08:00
Brian Anderson aeadc6269e wip 2011-12-20 20:15:09 -08:00
Brian Anderson 128621be97 rt: Remove rust_task::grow. Obsolete 2011-12-20 20:02:57 -08:00
Brian Anderson cab4da70c8 rt: Don't check the stack canary on most upcalls 2011-12-20 16:50:54 -08:00
Brian Anderson 2a490d1cf8 Revert "rt: Reduce the mac red zone to 2K"
This reverts commit ba8f369f89.
2011-12-20 15:17:30 -08:00
Brian Anderson ba8f369f89 rt: Reduce the mac red zone to 2K 2011-12-20 14:24:13 -08:00
Brian Anderson 2e230b1cf9 rt: Reduce the linux red zone to 2K 2011-12-20 14:02:59 -08:00