Commit Graph

294 Commits

Author SHA1 Message Date
Brian Anderson e3ccac8ed3 rt: Renome rust_task::lock to port_lock 2012-03-05 19:39:55 -08:00
Brian Anderson fa566ad2fd rt: Make the rust_task_thread lock private 2012-03-05 19:39:55 -08:00
Brian Anderson 2465a63a69 rt: Move transition from rust_task to rust_task_thread 2012-03-05 19:39:55 -08:00
Brian Anderson 237652299e rt: Protect cond and cond_name with the state_lock 2012-03-05 19:39:55 -08:00
Brian Anderson 0432030c27 rt: Don't take the task lock on state transitions 2012-03-05 19:39:55 -08:00
Brian Anderson b2a075e20d rt: Protect rust_task::state with a lock 2012-03-05 19:39:55 -08:00
Brian Anderson d7298a797b rt: Protect rust_task::killed with a lock 2012-03-05 19:39:55 -08:00
Brian Anderson ed7d25bb6d rt: Checking port_table.is_empty() requires a lock 2012-03-02 17:10:14 -08:00
Brian Anderson 04d9cc18a5 rt: Protect rust_task::supervisor with a lock 2012-03-02 16:33:33 -08:00
Brian Anderson 14306756b4 rt: Always delete task stacks on the task thread
There's not a real race here, but it makes helgrind happy and is arguably
less prone to future errrors.
2012-03-02 15:21:59 -08:00
Brian Anderson 7e9aa6c3c2 rt: Don't zero new stacks 2012-02-27 16:13:51 -08:00
Niko Matsakis 5ee89f3f2a add an option to the final cc so that it prints out/logs unreclaimed ptrs 2012-02-24 20:46:27 -08:00
Brian Anderson 155a67eae7 Revert "rt: Cut the red zone to 10K on mac"
This reverts commit cb7022cfc2.
2012-02-24 12:26:06 -08:00
Brian Anderson cb7022cfc2 rt: Cut the red zone to 10K on mac 2012-02-23 19:42:59 -08:00
Brian Anderson 7a6498668f rt: Cut the red zone to 2K on linux 2012-02-23 00:23:22 -08:00
Brian Anderson cd381333b9 rt: Cut the red zone to 4K on linux 2012-02-22 23:50:47 -08:00
Brian Anderson b5c7997ef5 rt: Switch to the C stack in reset_stack_limit 2012-02-22 23:50:47 -08:00
Brian Anderson c16bfbe0c3 rt: Stop logging on the Rust stack. Closes #1478 2012-02-22 22:30:21 -08:00
Brian Anderson d5e7f0d113 rt: Don't kill tasks while they are in a callback from C 2012-02-14 11:24:09 -08:00
Brian Anderson 3af4b2c998 rt: Call register/deregister_valgrind_stack from the stack con/destructors 2012-02-10 12:58:35 -08:00
Brian Anderson 3406da49d9 rt: Extract prepare_valgrind_stack from register_valgrind_stack 2012-02-10 12:58:35 -08:00
Brian Anderson c42492e6aa rt: Rename config_valgrind_stack to register_valgrind_stack, etc 2012-02-10 12:58:35 -08:00
Brian Anderson fc028c30a0 rt: Move the addition of the stack canary into create_stack 2012-02-10 12:58:35 -08:00
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