about summary refs log tree commit diff
path: root/src/rt/rust_scheduler.cpp
AgeCommit message (Collapse)AuthorLines
2012-09-19V2: now with more locks!Philipp Brüschweiler-21/+31
2012-09-19core: Allocate threads on demand, not on scheduler startupPhilipp Brüschweiler-28/+47
API change: rust_kernel::create_scheduler() or rust_scheduler::rust_scheduler() respecitevly now take ownership of the launch factory argument, it is needed to create new threads on demand. Also renames rustrt::sched_threads() to rustrt::rust_sched_threads() for consistency. Added rustrt::rust_max_sched_threads() to return the maximal number of scheduled threads of the current scheduler. Fixes #3493.
2012-07-20[3/4 for #2365, #2671] Fix exit/kill race with scheds during rust_kernel::failBen Blum-1/+3
2012-07-20[1/4 for #2365, #2671] Fix create/kill race with schedulers and tasks during ↵Ben Blum-5/+7
rust_kernel::fail
2012-04-07core: Add priv::weaken_taskBrian Anderson-0/+2
2012-04-03Merge remote-tracking branch 'brson/mainthread'Brian Anderson-11/+31
Conflicts: src/rt/rust_kernel.cpp src/rt/rust_scheduler.cpp src/rt/rust_scheduler.h
2012-04-03rt: Fix bugs in the osmain schedulerBrian Anderson-0/+6
2012-04-03actually remove memory.h; include cleanupsJon Morton-1/+1
2012-04-03Refactor includes structure, getting rid of rust_internal.hJon Morton-0/+3
Many changes to code structure are included: - removed TIME_SLICE_IN_MS - removed sychronized_indexed_list - removed region_owned - kernel_owned move to kernel.h, task_owned moved to task.h - global configs moved to rust_globals.h - changed #pragma once to standard guard in rust_upcall.h - got rid of memory.h
2012-04-02rt: Run a single-threaded scheduler on the main threadBrian Anderson-3/+3
2012-04-01remove rust_srvJon Morton-7/+1
2012-04-01rt: Introduce rust_sched_launcher_factory. Sorry, I need oneBrian Anderson-8/+7
2012-04-01rt: Allow some schedulers to stay alive even without tasks to executeBrian Anderson-4/+18
2012-04-01Merge remote-tracking branch 'brson/mainthread'Brian Anderson-16/+17
Conflicts: src/rt/rust_sched_loop.cpp src/rt/rust_shape.cpp src/rt/rust_task.cpp
2012-03-31rt: Extract rust_thread_sched_launcher from rust_sched_launcherBrian Anderson-1/+2
2012-03-31rt: Fix whitespaceBrian Anderson-5/+5
2012-03-31rt: Extract rust_sched_launcher from rust_task_threadBrian Anderson-16/+16
rust_sched_launcher is actually responsible for setting up the thread and starting the loop. There will be other implementations that do not actually set up a new thread, in order to support scheduling tasks on the main OS thread.
2012-03-31initialize cur_thread, first task on thread 0Jon Morton-2/+3
2012-03-31Choose task thread in rust_scheduler by round robinJon Morton-12/+13
Remove the random context from rust_scheduler and use a simple round robin system to choose which thread a new task gets put on. Also, some incorrect tab indents around scoped blocks were fixed.
2012-03-21rt: Stop using large stacks for the main taskBrian Anderson-8/+2
2012-03-18rt: Remove lock_held_by_current_threadBrian Anderson-1/+0
2012-03-15rt: Remove remaining uses of rust_kernel::get_task_by_idBrian Anderson-2/+2
2012-02-27rt: Change the way the kernel exits to avoid pthread leaksBrian Anderson-5/+9
This makes the kernel join every scheduler thread before exiting in order to ensure that all threads are completely terminated before the process exits. On my machine, for 32-bit targets, this was causing regular valgrind errors.
2012-02-08rt: Change the lifecycle of tasks and schedulers for various reasonsBrian Anderson-1/+22
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-08rt: Refactor the rust_kernel interface a bitBrian Anderson-1/+1
2012-02-08rt: Introduce scheduler idsBrian Anderson-2/+4
2012-02-08rt: Delete schedulers immediately upon releaseBrian Anderson-0/+5
This will be needed once we support dynamically changing schedulers.
2012-02-08rt: Change the scheme used for terminating the kernelBrian Anderson-5/+14
Instead of joining on the scheduler threads, instead keep a count of active schedulers. When there are no more schedulers raise a signal for the main thread to continue. This will be required once schedulers can be added and removed from the running kernel.
2012-02-03rt: Make isaac_init not a templateBrian Anderson-1/+1
2012-02-03rt: Remove some silly locks in rust_schedulerBrian Anderson-4/+0
2012-02-03rt: Clean up the way the kernel tracks tasksBrian Anderson-3/+1
2012-02-03rt: Extract rust_scheduler from rust_task_threadBrian Anderson-0/+110
2012-02-03rt: Rename rust_scheduler to rust_task_threadBrian Anderson-372/+0
2012-02-02rt: Remove lock_and_signal::signal_allBrian Anderson-1/+1
2012-02-02rt: Stop waking up the scheduler on a timerBrian Anderson-1/+1
2012-02-02rt: Remove unused arguments in rust_schedulerBrian Anderson-5/+5
2012-02-02rt: Simplify reap_dead_tasksBrian Anderson-28/+4
2012-02-02rt: Remove rust_scheduler::interrupt_flag. UnusedBrian Anderson-3/+0
2012-02-02rt: Only wake up all schedulers when no tasks are leftBrian Anderson-4/+17
At the moment there's not really any reason to be raising this signal, since they schedulers wake up periodically anyway, but once we remove the timer this will be how the schedulers know to exit.
2012-02-02rt: Remove bogus task reaping from the schedulerBrian Anderson-14/+4
2012-02-02rt: Remove rust_task::can_schedule. Does nothingBrian Anderson-13/+5
2012-02-02rt: Remove running_on flag. Does nothingBrian Anderson-2/+0
2012-02-02rt: Remove task pinning. Does nothingBrian Anderson-3/+0
2012-02-02rt: Remove yield timersBrian Anderson-4/+2
2012-02-01rt: Remove rust_timer. UnusedBrian Anderson-7/+0
2012-01-29rt: Make the initial segment of the main task's stack 1MBBrian Anderson-2/+3
This is a trick to fool microbenchmarks. Closes #1681
2012-01-12libcore: Add sys::set_exit_statusBrian Anderson-2/+0
Sets the process exit code
2012-01-06fix how we walk functions to match new closure fmtNiko Matsakis-1/+1
2011-12-28Tidy up some drift in runtime logging, close #1380.Graydon Hoare-8/+8
2011-12-08rt: Make __morestack work on win32Brian Anderson-0/+1