Brendan Cully
7910c72de5
Enable large stacks on 64-bit architectures
2013-07-11 15:40:16 -07:00
bors
41dcec2fe1
auto merge of #7265 : brson/rust/io-upstream, r=brson
...
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism
Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo.
[Here](e1555f9b56/src/libstd/rt/mod.rs (L201)
) is the current runtime setup code.
About half of this has already been reviewed.
2013-07-09 18:28:46 -07:00
Brian Anderson
2c1315719d
rt: Make the old rand builtins work with newsched
2013-07-09 15:05:43 -07:00
Brian Anderson
07e52eb7fc
std: Make os::set_exit_status work with newsched
2013-07-09 13:29:05 -07:00
Brian Anderson
fae3336769
Merge remote-tracking branch 'mozilla/master'
...
Conflicts:
src/libextra/test.rs
src/libstd/rt/global_heap.rs
src/libstd/unstable/lang.rs
src/libstd/vec.rs
2013-07-08 16:29:54 -07:00
Brian Anderson
b227583dad
Merge remote-tracking branch 'anasazi/io'
...
Conflicts:
src/libstd/rt/test.rs
2013-07-08 15:53:11 -07:00
Brian Anderson
4282539523
std::rt: Add a hack to allocate different test port ranges to different bots
2013-07-08 14:41:07 -07:00
Eric Reed
cf23292010
Merge remote-tracking branch 'upstream/io' into io
...
Conflicts:
src/libstd/rt/uvio.rs
2013-07-08 13:03:18 -07:00
Niko Matsakis
59083d2c6a
Address nits by @catamorphism
2013-07-08 13:55:10 -04:00
Niko Matsakis
af453a33cc
This assert does not necessarily hold; sometimes we temporarily increase ref-count
2013-07-08 13:55:10 -04:00
Luqman Aden
5007fb2d4d
Add x64 windows to platform.mk and mingw64 header fixes.
2013-07-03 23:33:59 -04:00
Brian Anderson
1098d6980b
Merge remote-tracking branch 'mozilla/master'
...
Conflicts:
src/libextra/test.rs
src/libstd/at_vec.rs
src/libstd/cleanup.rs
src/libstd/rt/comm.rs
src/libstd/rt/global_heap.rs
src/libstd/task/spawn.rs
src/libstd/unstable/lang.rs
src/libstd/vec.rs
src/rt/rustrt.def.in
src/test/run-pass/extern-pub.rs
2013-07-03 14:49:13 -07:00
Eric Reed
6a1a7819c9
Merge remote-tracking branch 'upstream/io' into io
...
Conflicts:
src/libstd/rt/test.rs
src/rt/rustrt.def.in
2013-07-02 16:55:56 -07:00
Eric Reed
e6c57793be
IPv6 support for UDP and TCP.
2013-07-02 16:40:57 -07:00
Brian Anderson
0e07c8d249
rt: Add global_args_lock functions to rustrt.def.in
2013-07-01 16:38:17 -07:00
Daniel Micay
b731d96b4f
vec: implement exchange vector reserve in Rust
2013-06-30 22:30:37 -04:00
Daniel Micay
b883d6a54c
simplify the exchange allocator
...
* 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-30 03:45:36 -04:00
bors
0bad3e62b4
auto merge of #7395 : yichoi/rust/android_dummy, r=brson
...
add android dummy functions which does not exist in boinic.
after #7257 , some mman related functions are needed for android.
2013-06-27 03:07:31 -07:00
Brian Anderson
8918461fc4
rt: Release big stacks immediately after use to avoid holding on to them 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-26 15:18:36 -07:00
Young-il Choi
6a77273104
rt: add android dummy functions for mman related
2013-06-26 10:25:12 +09:00
Eric Reed
f202713b73
satisfy the formatting check
2013-06-25 14:40:36 -07:00
Eric Reed
4870dce3eb
Merge remote-tracking branch 'upstream/io' into io
...
Conflicts:
src/rt/rustrt.def.in
2013-06-25 11:45:44 -07:00
bors
7aee5da08d
auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmr
...
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-25 04:38:06 -07:00
Brian Anderson
5e7c5d6c3d
std: Make box annihilator work with newsched
2013-06-24 17:07:03 -07:00
Brian Anderson
aa9210d25a
std: Rewrite vec_reserve_shared_actual in Rust
2013-06-24 17:07:01 -07:00
Alex Crichton
8fdc8f392c
Support foreign 'static mut' variables as well
2013-06-23 18:00:32 -07:00
Philipp Brüschweiler
e2f1049bd5
Remove unused TyDesc parameter from the glue functions
...
To remove the environment pointer, support for function pointers without
an environment argument is needed (i.e. a fixed version of #6661 ).
2013-06-23 13:02:00 +02:00
Philipp Brüschweiler
976c0b3dfb
Remove rust_call_tydesc_glue
...
Towards #4812 . Also includes some minor cleanups.
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
8bf0033345
Remove unused shape fields from typedescs
2013-06-23 12:49:16 +02:00
Brian Anderson
95eb01957b
std: Make console log off/on controls work with newsched
2013-06-21 16:52:07 -07:00
Brian Anderson
1b7c99655f
std::rt: Support os::args
2013-06-21 14:42:15 -07:00
bors
45f588e8fd
auto merge of #7200 : yichoi/rust/fix_je_mac_cross, r=brson
...
while cross-compiling, ar in cross toolchains are required.
linux is not sensitive so could not see errors.
2013-06-21 04:10:53 -07:00
Brian Anderson
357f087786
Merge remote-tracking branch 'brson/io' into io-upstream
...
Conflicts:
src/rt/rust_builtin.cpp
src/rt/rustrt.def.in
2013-06-20 12:17:00 -07:00
James Miller
3bc4d1a120
Remove all #[cfg(stage0)]-protected code
...
New snapshot means this can all go. Also removes places that have
comments that say they are workarounds for stage0 errors.
2013-06-21 02:43:02 +12:00
Brian Anderson
5086c0850e
std::rt: Update GC metadata in init
2013-06-19 16:08:07 -07:00
Brian Anderson
7f55fc33f0
std: Work around some failing 'run' tests when valgrinding. #7224
...
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-18 19:52:05 -07:00
Eric Reed
35f3fa6383
Merge remote-tracking branch 'upstream/io' into io
...
Conflicts:
src/libstd/rt/uvio.rs
2013-06-17 12:45:40 -07:00
Young-il Choi
474bd60c1b
rt: fix jemalloc android cross-compile for mac
2013-06-17 20:20:24 +09:00
Brian Anderson
319cf6e465
Merge remote-tracking branch 'brson/io'
...
Conflicts:
src/libstd/rt/comm.rs
src/libstd/rt/mod.rs
src/libstd/rt/sched.rs
src/libstd/rt/task.rs
src/libstd/rt/test.rs
src/libstd/rt/tube.rs
src/libstd/rt/uv/uvio.rs
src/libstd/rt/uvio.rs
src/libstd/task/spawn.rs
2013-06-16 15:09:25 -07:00
Niko Matsakis
461a79a247
Partial fix for #7158 : Save EDX in morestack on x86-32
2013-06-16 12:46:51 -04:00
Eric Reed
74e7255193
Added a utility function to extract the udp handle from udp send requests.
2013-06-14 11:39:46 -07:00
Daniel Micay
ec27644870
automated whitespace fixes
2013-06-13 18:03:08 -04:00
Eric Reed
5393e43b53
Corrected libuv UDP bindings.
2013-06-13 12:51:32 -07:00
Daniel Micay
0685c657f0
update jemalloc to 3.4.0
2013-06-12 00:26:15 -04:00
bors
1175e94de3
auto merge of #7033 : influenza/rust/rust-7022, r=graydon
...
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-11 14:40:48 -07:00
Ron Dahlgren
37c8558895
Replace tabs with spaces
2013-06-11 13:10:41 -07:00
Ron Dahlgren
301f9001c0
Assert stk rather than checking null
...
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-11 10:11:49 -07:00
Young-il Choi
febba9f418
rt: dummy function pthread_atfork for android
2013-06-11 14:52:15 +09:00
James Miller
e9c309c0e5
STATIC_PAGE_SHIFT for cross-compiling jemalloc
...
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-10 18:26:24 +12:00
Ron Dahlgren
12203a76c2
Check stk before dereferencing
...
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-09 10:43:16 -07:00