summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2013-06-30vec: implement exchange vector reserve in RustDaniel Micay-8/+0
2013-06-30simplify the exchange allocatorDaniel Micay-24/+0
* stop using an atomic counter, this has a significant cost and valgrind will already catch these leaks * remove the extra layer of function calls * remove the assert of non-null in free, freeing null is well defined but throwing a failure from free will not be * stop initializing the `prev`/`next` pointers * abort on out-of-memory, failing won't necessarily work
2013-06-27auto merge of #7395 : yichoi/rust/android_dummy, r=brsonbors-0/+25
add android dummy functions which does not exist in boinic. after #7257, some mman related functions are needed for android.
2013-06-26rt: Release big stacks immediately after use to avoid holding on to them ↵Brian Anderson-47/+31
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-26rt: add android dummy functions for mman relatedYoung-il Choi-0/+25
2013-06-25auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmrbors-16/+10
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475. Update: this now also removes the unused shape fields in tydescs.
2013-06-23Support foreign 'static mut' variables as wellAlex Crichton-1/+13
2013-06-23Remove unused TyDesc parameter from the glue functionsPhilipp Brüschweiler-2/+10
To remove the environment pointer, support for function pointers without an environment argument is needed (i.e. a fixed version of #6661).
2013-06-23Remove rust_call_tydesc_gluePhilipp Brüschweiler-10/+1
Towards #4812. Also includes some minor cleanups.
2013-06-23Remove unused shape fields from typedescsPhilipp Brüschweiler-8/+3
2013-06-21auto merge of #7200 : yichoi/rust/fix_je_mac_cross, r=brsonbors-1/+2
while cross-compiling, ar in cross toolchains are required. linux is not sensitive so could not see errors.
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-27/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-18std: Work around some failing 'run' tests when valgrinding. #7224Brian Anderson-0/+7
Under valgrind on 64->32 cross compiles the dynamic linker is emitting some error messages on stderr, which interferes with the tests that are checking stderr.
2013-06-17rt: fix jemalloc android cross-compile for macYoung-il Choi-1/+2
2013-06-16Partial fix for #7158: Save EDX in morestack on x86-32Niko Matsakis-0/+2
2013-06-13automated whitespace fixesDaniel Micay-1/+0
2013-06-12update jemalloc to 3.4.0Daniel Micay-2785/+2833
2013-06-11auto merge of #7033 : influenza/rust/rust-7022, r=graydonbors-2/+2
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-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-11rt: dummy function pthread_atfork for androidYoung-il Choi-0/+7
2013-06-10STATIC_PAGE_SHIFT for cross-compiling jemallocJames Miller-161/+170
Sets `STATIC_PAGE_SHIFT` for cross-compiling jemalloc to 12. A shift of 12 represents a page size of 4k for practically all platforms.
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-06-06auto merge of #6895 : cmr/rust/jemalloc, r=brsonbors-0/+44423
2013-06-06auto merge of #6053 : nikomatsakis/rust/fixme-2699, r=thestingerbors-1/+0
r? @jld or @graydon The calculation looks right to me, but perhaps one of you two can double check. You two seem like you are doing the most recent work in this sort of area.
2013-06-06Deduplicate words in code commentsAlexei Sholik-7/+7
2013-06-01add jemalloc to the runtimeDaniel Micay-0/+44423
2013-05-28auto merge of #6731 : thomaslee/rust/issue-6575, r=pcwaltonbors-4/+29
Fix for #6575. In the trans phase, rustc emits code for a function parameter that goes completely unused in the event the return type of the function in question happens to be an immediate. This patch modifies rustc & parts of rustrt to ensure that the vestigial parameter is no longer present in compiled code.
2013-05-27Added _RUST_STAGEN guard to rust_call_tydesc_glueTom Lee-0/+7
2013-05-27Add _RUST_STAGE0 #ifdefsTom Lee-0/+20
2013-05-27Omit unused implicit argument if return type is immediate.Tom Lee-10/+8
2013-05-27Use passing by-value in gmtime, mktimeDaniel Farina-6/+6
Per the recommendation of the now-removed FIXME.
2013-05-25Fix compilation errors with linenoiseAlex Crichton-2/+2
2013-05-24Update the linenoise libraryAlex Crichton-19/+211
2013-05-22fix arm stack alignmentJyun-Yan You-2/+4
2013-05-21auto merge of #6650 : crabtw/rust/mips-rt, r=sanxiynbors-2/+4
Results of libcore and libstd tests ``` failures: rand::tests::test_rng_seeded_custom_seed2 time::tests::run_tests uv_ll::test::test_uv_ll_struct_size_addrinfo uv_ll::test::test_uv_ll_struct_size_uv_timer_t segfaults: stackwalk::test_simple stackwalk::test_simple_deep ```
2013-05-21fix mips stack alignmentJyun-Yan You-2/+4
2013-05-20rt: Rename rust_initialize_global_state to rust_initialize_rt_tls_keyBrian Anderson-3/+3
2013-05-18auto merge of #6577 : brson/rust/io-upstream, r=pcwaltonbors-20/+52
r? This is all of my scheduler work on #4419 from the last 3 weeks or so. I've had a few failed pull requests so far but I think the problems are ironed out. * TCP * The beginnings of runtime embedding APIs * Porting various corners of core to be compatible with both schedulers * libuv timer bindings * Further refinement of I/O error handling, including a new, incomplete, `read_error` condition * Incomplete refactoring to make tasks work without coroutines and user-space scheduling * Implementations of Reader/Writer extension methods * Implementations of the most important part of core::comm I'm particularly happy with how easy the [comm types on top of the scheduler](https://github.com/brson/rust/blob/io-upstream/src/libcore/rt/comm.rs). Note that these implementations do not use pipes. If anything here needs careful review though it's this code. This branch passes 95% of the run-pass tests (with `TESTARGS=--newrt`) In the next week I'll probably spend some time adding preliminary multithreading and seeing how close we are to removing the old runtime.
2013-05-17auto merge of #6249 : crabtw/rust/arm, r=brsonbors-0/+11
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
2013-05-15rt: Rename sched_key to rt_keyBrian Anderson-8/+8
It is more general-purpose than holding scheduler pointers
2013-05-15core::rt: Add uv timer bindingsBrian Anderson-1/+1
2013-05-15core::rt: Initialize loggingBrian Anderson-1/+5
2013-05-15core: Use a global lock instead of runtime lock for os::getenv, etc. #4726Brian Anderson-1/+20
2013-05-15core:rt: A few micro-optsBrian Anderson-11/+7
2013-05-14core::rt: Register stacks with valgrind. #6428Brian Anderson-0/+13
2013-05-14core::rt: 0 is a valid TLS keyBrian Anderson-2/+2
2013-05-13Correct #[always_inline] -> #[inline(always)] and __attribute((...)) -> ↵Luqman Aden-1/+1
__attribute__((...)).
2013-05-10auto merge of #6358 : crabtw/rust/mips-segstk, r=brsonbors-6/+102
I changed ```RED_ZONE_SIZE``` to ```RZ_MAC_32``` because of stack canary failure. Here is a LLVM patch for MIPS segmented stacks. http://people.cs.nctu.edu.tw/~jyyou/rust/mips-segstk.patch Current test results ``` failures: rand::tests::test_rng_seeded_custom_seed2 run::tests::test_forced_destroy_actually_kills run::tests::test_unforced_destroy_actually_kills time::tests::run_tests uv_ll::test::test_uv_ll_struct_size_addrinfo uv_ll::test::test_uv_ll_struct_size_uv_timer_t segfaults: rt::io::option::test::test_option_writer_error rt::local_services::test::unwind rt::sched::test_swap_tasks_then stackwalk::test_simple stackwalk::test_simple_deep ```
2013-05-09auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiynbors-2/+2
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean