Commit Graph

294 Commits

Author SHA1 Message Date
Brian Anderson 6bdf347418 rt: Make __morestack (without unwinding) work on 32-bit linux 2011-11-22 18:02:10 -08:00
Brian Anderson 9aa67052e1 rt: Remove some stack-wasting macros from rust_task::yield 2011-11-18 15:59:10 -08:00
Brian Anderson 1e58049da2 rt: Remove fail calls from rust_task::yield 2011-11-18 15:36:48 -08:00
Brian Anderson 792068d871 rt: Remove unblock call from rust_task::yield 2011-11-18 14:45:48 -08:00
Brian Anderson 0f339b481a rt: Remove a lock from task_start_wrapper that does nothing 2011-11-18 13:38:20 -08:00
Brian Anderson 3cfcdb4bb2 rt: Replace two uses of yield with ctx->swap
These uses aren't really doing a full yield. They are just giving up control
to the scheduler and will never return.
2011-11-18 13:38:18 -08:00
Brian Anderson 57b43b53f9 rt: Add comments to rust_task::yield 2011-11-18 13:28:12 -08:00
Brian Anderson d1ef29ab37 rt: rust_task::conclude_failure doesn't need to call unblock 2011-11-18 13:23:27 -08:00
Brian Anderson 93931311ff rt: Add FIXMEs about races in rust_task 2011-11-18 10:32:27 -08:00
Brian Anderson 0dfa1410d3 rt: Remove task::on_wakeup. Unused 2011-11-18 10:32:27 -08:00
Brian Anderson 63d40b8ab6 rt: Remove some unnecessary setting of rust_task::killed
The value of this variable doesn't matter after the task fails.
2011-11-18 10:32:27 -08:00
Brian Anderson d52888f0ba rt: Remove rust_task::yield. Unused 2011-11-18 10:32:27 -08:00
Brian Anderson 5e9f9e8c48 rt: Add some comments about methods that run on the Rust stack 2011-11-18 10:32:27 -08:00
Niko Matsakis 60e93cd1ec Re-enable cycle coll. on x86_64, seems to work better now. 2011-11-17 14:40:03 -08:00
Patrick Walton e6c3c4e48c rt: More work on morestack 2011-11-17 10:52:59 -08:00
Brian Anderson 02cebbb9f1 Revert "rt: More work on morestack"
This reverts commit 68aff2ad6d.
2011-11-16 18:49:19 -08:00
Patrick Walton 68aff2ad6d rt: More work on morestack 2011-11-16 18:00:57 -08:00
Brian Anderson 8199558443 rt: Remove an unnecessary check from rust_task::yield 2011-11-16 17:55:04 -08:00
Brian Anderson bae817efe6 rt: Remove rust_task::notify_tasks_wating_to_join 2011-11-16 17:22:14 -08:00
Niko Matsakis 69911c2bc1 temp. disable cycle coll. on x86_64 2011-11-16 15:16:41 -08:00
Patrick Walton b3cf0c4d1b Revert "rt: More work on morestack"
This reverts commit ced0d4f15e.
2011-11-14 16:20:53 -08:00
Patrick Walton ced0d4f15e rt: More work on morestack 2011-11-14 16:17:08 -08:00
Brian Anderson 58e923de6e rt: Perform task notification before killing the parent task 2011-11-13 16:36:47 -08:00
Brian Anderson 3d9023fa4d rt: Take the task lock when dropping port refcounts
Sucks, but otherwise there are races when one task drops the refcount to zero
followed by another bumping it again
2011-11-11 16:11:31 -08:00
Brian Anderson 07771ec25b Fix run-fail/spawnfail
Catch the case where a parent is killed immediately before it terminates
normally.
2011-11-11 14:20:00 -08:00
Brian Anderson 2385deaa0d rt: Add locking invariants to rust_task 2011-11-11 12:11:21 -08:00
Brian Anderson 5d1e321ecb rt: Remove rust_chan 2011-11-11 12:11:21 -08:00
Brian Anderson 793da65a8e rt: Move rust_chan::send to rust_port::send 2011-11-10 17:53:19 -08:00
Patrick Walton c9003d301f Stub a __morestack implementation and stack segment allocation. Untested. 2011-10-31 14:20:56 -07:00
Marijn Haverbeke 8124846b2c Get rid of taskpointer-passing throughout the compiler
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-20 14:22:17 +02:00
Marijn Haverbeke e927df17f7 Remove spawn_wrap and main_wrap kludges
This isn't needed now that our functions are cdecl (and was apparently
only still working by accident).

Issue #992
2011-10-20 13:15:09 +02:00
Patrick Walton 5c973142df rt: Turn on cycle collection at task death; add a test case 2011-09-26 16:59:15 -07:00
Patrick Walton ad19ab4c6f rt: Make the logic that moves environments between tasks update the GC alloc chain correctly 2011-09-26 16:59:15 -07:00
Patrick Walton 307957710c rt: Remove the GC alloc chain 2011-09-20 14:20:16 -07:00
Brian Anderson 25394950ae Handle the case where a child task tries to kill a parent while it is dying
Still looks pretty racy
2011-09-16 10:05:12 -07:00
Brian Anderson a0ad9a42cd Unsupervise tasks before the scheduler kills them. Unblock before yield->fail 2011-09-14 17:05:35 -07:00
Brian Anderson 103197bc42 Make failure propagation to dead parents work
The failure will basically go 'through' the dead parent and continue
propagating the failure (as if the child was reparented).
2011-09-14 15:48:14 -07:00
Brian Anderson 9505d70513 Make linked task failure work again 2011-09-14 14:20:41 -07:00
Brian Anderson 6f6f36172b Remove unused task_exit function
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson c047cfb710 Unwind the stack on task failure
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-07 10:32:58 -07:00
Brian Anderson c337fd5467 Child tasks take a ref to their parents
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-07 10:32:58 -07:00
Brian Anderson 25ae3d655c Rewrite spawn yet again
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-07 10:32:58 -07:00
Brian Anderson bb08ffbaf4 Refactor task failure a bit
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson abdb6cd71b Rewrite reap_dead_tasks to never grab the sched lock before a task lock
Doing so contradicts the locking order used everywhere else and causes
deadlocks.

Un-XFAIL task-perf-spawnalot

Closes #854
2011-08-20 16:21:27 -07:00
Patrick Walton d0171913aa rt: Remove rustboot's GC infrastructure 2011-08-19 19:17:05 -07:00
Eric Holk ae89ea223d Making more of the rust_task structure directly accessible from Rust. 2011-08-17 14:42:40 -07:00
Patrick Walton d8c5bd6195 rt: Implement obstacks, untested as of yet 2011-08-16 19:49:25 -07:00
Eric Holk 8686645aad New channel-based task status notifications. 2011-08-16 16:47:40 -07:00
Eric Holk cf2def46c1 Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library. 2011-08-16 09:36:29 -07:00
Eric Holk be7325073a Removed spawn and task from the parser. Updated all the tests except for the benchmarks. 2011-08-15 09:26:52 -07:00