summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
AgeCommit message (Collapse)AuthorLines
2013-06-26rt: Release big stacks immediately after use to avoid holding on to them ↵Brian Anderson-42/+14
through yields This avoids the following pathological scenario that makes threadring OOM: 1) task calls C using fast_ffi, borrowing a big stack from the scheduler. 2) task returns from C and places the big stack on the task-local stack segment list 3) task calls further Rust functions that require growing the stack, and for this reuses the big stack 4) task yields, failing to return the big stack to the scheduler. 5) repeat 500+ times and OOM Conflicts: src/rt/rust_task.cpp
2013-06-23Remove unused TyDesc parameter from the glue functionsPhilipp Brüschweiler-1/+5
To remove the environment pointer, support for function pointers without an environment argument is needed (i.e. a fixed version of #6661).
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-8/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-11Replace tabs with spacesRon Dahlgren-2/+2
2013-06-11Assert stk rather than checking nullRon Dahlgren-3/+3
Given that a big stack is never requested before allocating an initial stack segment, having a non-null stk member here is an invariant.
2013-06-09Check stk before dereferencingRon Dahlgren-1/+1
This commit fixes #7022 - I've added an additional check to ensure that stk is not null before dereferencing it to get it's next element, assigning NULL if it is itself NULL.
2013-05-27Add _RUST_STAGE0 #ifdefsTom Lee-0/+8
2013-05-27Omit unused implicit argument if return type is immediate.Tom Lee-4/+2
2013-05-07When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`.Niko Matsakis-9/+2
Fixes #6141.
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-1/+1
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-01add an option to debug borrows (RUST_DEBUG_BORROW) so you canNiko Matsakis-0/+11
find out where the offending borrow occurred. This ... still needs some work.
2013-04-30Merge remote-tracking branch 'brson/io'Brian Anderson-1/+1
Conflicts: src/libcore/task/local_data_priv.rs
2013-04-26rt: Set the stack depth limit to 1GB. Abort on error.Brian Anderson-2/+2
People hit the recursion depth limit too often, it's not possible to unwind reliably from out-of-stack. Issues #3555, #3695
2013-04-23Merge remote-tracking branch 'brson/io'Brian Anderson-1/+1
This also reverts some changes to TLS that were leaking memory. Conflicts: src/libcore/rt/uv/net.rs src/libcore/task/local_data_priv.rs src/libcore/unstable/lang.rs
2013-04-21rt: Don't make memory_region depend on rust_envBrian Anderson-1/+1
I am going to use memory_region and boxed_region as the local heap in the new scheduler, for now at least, and I don't have a rust_env available.
2013-04-19rt: Remove dump_stacksPatrick Walton-1/+0
2013-04-19rt: Fix scalability problem with big stacks on 32 bitPatrick Walton-3/+62
2013-04-19librustc: Implement fast-ffi and use it in various placesPatrick Walton-2/+3
2013-02-14rm the unused calloc wrapper from memory_regionDaniel Micay-5/+0
it doesn't actually call calloc, so it's fairly pointless
2013-02-06Rewrite the exchange allocator to work without an active scheduler. #4457Brian Anderson-1/+1
2013-02-01rt: Remove get_frame_glue_fns. UnusedBrian Anderson-6/+0
2013-02-01rt: Remove portsBrian Anderson-2/+0
2013-01-13Win32 build fixBrian Anderson-1/+1
2013-01-13More android supportILyoan-1/+5
Conflicts: Makefile.in cmakeFiles/rustllvm.cmake
2012-12-10Add license boilerplate to more files.Graydon Hoare-0/+10
2012-11-15rt: Don't print backtraces unless the ::rt::backtrace log level is greater ↵Brian Anderson-1/+1
than log_err
2012-09-25rt: Remove the cycle collectorPatrick Walton-2/+0
2012-09-24rt: Call the Rust box annihilator; stop calling the cycle collectorPatrick Walton-12/+5
This reverts commit 991cbfe42c8836e8b4adfcaf288d5c0b8d57397c.
2012-09-24Revert "rt: Call the Rust box annihilator; stop calling the cycle collector" ↵Patrick Walton-5/+12
due to crashes This reverts commit bb0ad11252c493ca8de85025411c3f068f529039.
2012-09-24rt: Call the Rust box annihilator; stop calling the cycle collectorPatrick Walton-12/+5
2012-09-05rt: Make the boxed region come earlier in the rust_task structure.Patrick Walton-1/+1
This is so that GC can find it more easily.
2012-08-24Avoid lifecycle_lock traffic in call_on_rust_stack. (close #3270)Ben Blum-0/+7
2012-08-21Bypass lifecycle_lock in inhibit_kill/allow_kill for 3% to 5% speedup. Close ↵Ben Blum-4/+6
#3213.
2012-08-06Refcount tasks in packets to avoid races.Eric Holk-3/+0
Revert "Once again, revert "Use pipes in compiletest"" Fixes #3098
2012-08-06More documentation on pipes, and moving assert in runtime.Eric Holk-2/+2
2012-08-03Be more defensive in pipes (#3098)Eric Holk-0/+3
2012-08-01Linked failure: enable unidirectional propagate test; replace FIXMEs with ↵Ben Blum-1/+1
comments (tag #1868).
2012-07-25minor rt cleanupBen Blum-9/+0
2012-07-25Remove notification channels in runtime (closes #1078)Ben Blum-26/+0
2012-07-24Change yield() and wait_event() to be MUST_CHECK and return the killed flag. ↵Ben Blum-9/+18
(closes #2875)
2012-07-24tiny runtime cleanupBen Blum-6/+0
2012-07-24Add 'do atomically { .. }' for exclusivesBen Blum-0/+21
2012-07-20[1/4 for #2365, #2671] Fix create/kill race with schedulers and tasks during ↵Ben Blum-1/+10
rust_kernel::fail
2012-07-17Tasks should not hold a ref to their parent (Close #1789)Ben Blum-34/+2
2012-07-13Oops, switch more TODOs to FIXMEsBen Blum-2/+2
2012-07-13Add asserts to check fail_sched_loop() only onceBen Blum-1/+7
2012-07-13Reintroduce linked failure (killing runtime)Ben Blum-1/+11
This reverts commit 5724c6454950617c292daba89cdb9a3b4c862430.
2012-07-13Reintroduce linked failure (rust_port locking)Ben Blum-4/+3
This reverts commit a10f52c5793b358a16e3e98db4b16c65ba8e254b.
2012-07-13Reintroduce linked failure (renaming runtime fns)Ben Blum-15/+15
This reverts commit 3b159c6d5ba48643e8982e7cadbc1745e9f29f62.
2012-07-13Reintroduce linked failure (lifecycle lock)Ben Blum-37/+30
This reverts commit 08c40c5eb7bda79850f725308b72c1451fb67a86.