about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
AgeCommit message (Collapse)AuthorLines
2011-10-31Stub a __morestack implementation and stack segment allocation. Untested.Patrick Walton-0/+26
2011-10-20Get rid of taskpointer-passing throughout the compilerMarijn Haverbeke-3/+2
Only intrinsics still take a dummy taskptr. We'll have to do some makefile stunts to snapshot a version without taskptrs-in-intrinsics. Issue #466
2011-10-20Remove spawn_wrap and main_wrap kludgesMarijn Haverbeke-16/+0
This isn't needed now that our functions are cdecl (and was apparently only still working by accident). Issue #992
2011-09-26rt: Turn on cycle collection at task death; add a test casePatrick Walton-1/+3
2011-09-26rt: Make the logic that moves environments between tasks update the GC alloc ↵Patrick Walton-0/+31
chain correctly
2011-09-20rt: Remove the GC alloc chainPatrick Walton-1/+0
2011-09-16Handle the case where a child task tries to kill a parent while it is dyingBrian Anderson-1/+1
Still looks pretty racy
2011-09-14Unsupervise tasks before the scheduler kills them. Unblock before yield->failBrian Anderson-0/+3
2011-09-14Make failure propagation to dead parents workBrian Anderson-3/+9
The failure will basically go 'through' the dead parent and continue propagating the failure (as if the child was reparented).
2011-09-14Make linked task failure work againBrian Anderson-3/+12
2011-09-11Remove unused task_exit functionBrian Anderson-12/+0
Issue #236
2011-09-07Unwind the stack on task failureBrian Anderson-8/+40
When a task fails, we will throw an exception, then catch it at the bottom of the stack. On Windows we don't do this yet because the exception doesn't propagate correctly. No cleanups yet. Issue #236
2011-09-07Child tasks take a ref to their parentsBrian Anderson-0/+10
This is so that when a child dies after the parent, it still holds a valid pointer and can call supervisor->kill() safely.
2011-09-07Rewrite spawn yet againBrian Anderson-8/+33
The motivation here is that the bottom of each stack needs to contain a C++ try/catch block so that we can unwind. This is already the case for main, but not spawned tasks. Issue #236
2011-09-07Refactor task failure a bitBrian Anderson-0/+3
Issue #236
2011-08-20Rewrite reap_dead_tasks to never grab the sched lock before a task lockBrian Anderson-0/+1
Doing so contradicts the locking order used everywhere else and causes deadlocks. Un-XFAIL task-perf-spawnalot Closes #854
2011-08-19rt: Remove rustboot's GC infrastructurePatrick Walton-88/+3
2011-08-17Making more of the rust_task structure directly accessible from Rust.Eric Holk-7/+6
2011-08-16rt: Implement obstacks, untested as of yetPatrick Walton-1/+2
2011-08-16New channel-based task status notifications.Eric Holk-2/+24
2011-08-16Removed trans_comm.rs from the compiler. Updating aio/sio to work with the ↵Eric Holk-0/+11
new chan and port system, started on a networking module for the standard library.
2011-08-15Removed spawn and task from the parser. Updated all the tests except for the ↵Eric Holk-2/+9
benchmarks.
2011-08-15Fixed memory accounting and task stack creation bugs.Eric Holk-1/+6
2011-08-15Added a library version of spawn. Before long, we can remove the old version.Eric Holk-15/+16
2011-08-15First step towards port handles.Eric Holk-2/+21
2011-08-08Introduced task handles.unknown-0/+2
This is the new way to refer to tasks in rust-land. Currently all they do is serve as a key to look up the old rust_task structure. Ideally they won't be ref counted, but baby steps.
2011-07-29Removing proxies and message queues.Eric Holk-9/+0
2011-07-28Do all runtime calls to getenv at initializationBrian Anderson-15/+12
getenv is not threadsafe and (maybe as a result) it's randomly crashing with CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their own.
2011-07-28Atomic reference counting for tasks.Eric Holk-19/+4
2011-07-28Made task threads wait instead of sleep, so they can be woken up. This ↵Eric Holk-1/+7
appears to give us much better parallel performance. Also, commented out one more unsafe log and updated rust_kernel.cpp to compile under g++
2011-07-28Adding a function to stdlib to set the min stack size, for programsEric Holk-1/+2
that absolutely will not succeed with a large default stack. This should be removed once we have stack grown working. Also updated word-count to succeed under the new test framework.
2011-07-28Per-thread scheduling. Closes #682.Eric Holk-5/+9
Tasks are spawned on a random thread. Currently they stay there, but we should add task migration and load balancing in the future. This should drammatically improve our task performance benchmarks.
2011-07-28Made root_task no longer special.Eric Holk-6/+4
2011-07-21Bump the stack size and make the RUST_MIN_STACK env variable accept hex values.Michael Sullivan-2/+2
2011-07-21Lots of work on memory tracking and channels.Eric Holk-5/+6
We're trying to get closer to doing correct move semantics for channel operations. This involves a lot of cleanup (such as removing the unused sched parameter from rust_vec constructor) and making circular_buffer kernel_owned. Added tagging for memory allocations. This means we give a string tag to everything we allocate. If we leak something and TRACK_ALLOCATIONS is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-15Modify task::join to indicate how the task terminatedBrian Anderson-1/+3
This involves sticking yet another field into the task structure
2011-07-14Move the responsibility for process failure from tasks to the schedulerBrian Anderson-3/+2
When the root task fails the process fails. Failures on other tasks propagate up the task tree. Failures on non-root tasks without parents just (theoretically) unwind and disappear.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-3/+3
2011-07-13Fix compile-command lines in rt.Graydon Hoare-1/+1
2011-07-13Remove obsolete nargs counts from runtime.Graydon Hoare-9/+6
2011-07-13Attempt to correct buggy win32 timer code (causing tinderbox failures).Graydon Hoare-2/+2
2011-07-08Added an environment variable to override the minimum stack size. Closes #637.Eric Holk-1/+10
2011-07-07Fixed two races.Eric Holk-0/+3
The first is that the memory_region destructor would complain there is still an outstanding allocation. This is because circular_buffer from rust_chan wasn't refing its task, so the task was being destructed too soon. The second was where the program could deadlock while joining a task. The target task would die in the time between checking whether the task should block and then actually blocking. The fix is to use the target task's lock.
2011-07-07Work on debugging race conditions.Eric Holk-0/+3
Ports and channels have been moved to the kernel pool, since they've been known to outlive their associated task. This probably isn't the right thing to do, the life cycle needs fixed instead. Some refactorying in memory_region.cpp. Added a helper function to increment and decrement the allocation counter. This makes it easier to switch between atomic and non-atomic increments. Using atomic increments for now, although this still does not fix the problem.
2011-07-07Removing the synchronized memory region from tasks.Eric Holk-50/+8
2011-07-07Removing most of the locks in rust_upcall.cpp and elsewhere.Eric Holk-18/+7
2011-07-06rt: Double stack sizePatrick Walton-1/+1
2011-07-06Added a task wakeup callback. Closes #599.Eric Holk-1/+10
The callback happens when a task moves from the "blocked" state to the "running" state. The callback is also inherited by child tasks. There is currently only a native API. This code hasn't been heavily exercised yet.
2011-06-29Added inheritance for task pinning. Closes #598 for real.Eric Holk-0/+6
2011-06-29Adding support for pinning tasks to the currently running thread. Closes #598.Eric Holk-3/+14