Alex Crichton
e3fb7062aa
Work around stage0 to remove '@' requirements from TLS
2013-07-11 00:21:26 -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
Alex Crichton
692a22e69d
Change the elements in the task-local map to be actual key-value pairs
2013-07-09 17:31:01 -07:00
Brian Anderson
413d51e32d
std::rt: Ignore 0-byte udp reads
2013-07-09 16:54:56 -07:00
Brian Anderson
6fb92f8cab
std::rt: Do local tests in a bare thread to not interfere with the scheduler
2013-07-09 15:48:22 -07:00
Daniel Micay
a4af0960bd
remove the unused exchange_malloc align
parameter
...
`malloc` already returns memory correctly aligned for every possible
type in standard C, and that's enough for all types in Rust too
2013-07-09 16:35:56 -04:00
Brian Anderson
07e52eb7fc
std: Make os::set_exit_status work with newsched
2013-07-09 13:29:05 -07:00
Brian Anderson
ec6d4a1733
std::rt: size_t, not u64
2013-07-09 11:05:57 -07:00
Brian Anderson
7826651335
Tidy
2013-07-08 17:22:51 -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
5e0be46852
changed .each() to .iter().advance()
2013-07-08 14:19:39 -07:00
Eric Reed
6b2abcaa0f
renamed finalize to drop in Drop impl for UvUdpSocket
2013-07-08 14:19:19 -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
Daniel Micay
90f1db10fa
remove headers from exchange allocations
2013-07-08 04:54:41 -04:00
Daniel Micay
0aedecf96b
add a temporary vector_exchange_malloc lang item
2013-07-08 03:41:21 -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
Huon Wilson
cdea73cf5b
Convert vec::{as_imm_buf, as_mut_buf} to methods.
2013-07-04 00:46:50 +10:00
Eric Reed
b60cf0c5b0
converted TODOs into XXXs
2013-07-02 17:27:46 -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
toddaaro
0607178280
A missing ! made it so that the testcase schedule_home_states was throwing spurious assert failures. Why this did not result in the test case failing previously is beyond me.
2013-07-02 11:44:51 -07:00
toddaaro
27818ea7c4
removed unnecessary import that slipped in during merge
2013-07-01 16:51:59 -07:00
toddaaro
062bfd310a
merging task/coroutine refactoring back into upstream
2013-07-01 16:41:17 -07:00
toddaaro
5cfad4b6de
Refactored the runtime to view coroutines as a component of tasks, instead of tasks as a component of coroutines.
2013-07-01 16:14:56 -07:00
Daniel Micay
5b40f2ae5b
pass exchange_malloc an alignment, not a tydesc
2013-06-30 23:30:40 -04:00
Daniel Micay
0d7799d304
global_heap: inline get_box_size and align_to
2013-06-30 22:41:51 -04:00
Daniel Micay
80ab877841
global_heap: inline malloc_raw and add realloc_raw
2013-06-30 22:22:52 -04:00
Daniel Micay
4a29d6eb3f
add a closure_exchange_malloc lang item
...
this makes the exchange allocation header completely unused, and leaves
it uninitialized
2013-06-30 16:24:47 -04:00
Daniel Micay
408eef0d89
stop initializing ref_count in exchange_alloc
...
this is never read anymore
2013-06-30 16:22:55 -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
Patrick Walton
f9b54541ee
librustc: Disallow "mut" from distributing over bindings.
...
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28 10:44:15 -04:00
Patrick Walton
1c0aa78481
librustc: Change "Owned" to "Send" everywhere
2013-06-28 10:44:15 -04:00
Huon Wilson
366ca44cc8
std: silence some test warnings.
2013-06-28 01:45:24 +10:00
Huon Wilson
32d655916f
Convert vec::{reserve, reserve_at_least, capacity} to methods.
2013-06-28 00:40:47 +10:00
Huon Wilson
d0512b1055
Convert vec::[mut_]slice to methods, remove vec::const_slice.
2013-06-27 22:36:09 +10:00
Brian Anderson
ddbccecc27
std::rt: Some cleanup
2013-06-26 17:00:42 -07:00
Eric Reed
42f3f069fa
changed NOTE to TODO
2013-06-26 13:48:49 -07:00
Eric Reed
ce97bd4c8b
cleaned up uv/net
2013-06-26 10:17:10 -07:00
Eric Reed
87ecfb7435
converted TCP interface to newtype structs
2013-06-26 09:37:48 -07:00
Eric Reed
d0dc6970d8
removed unecessary method
2013-06-26 09:37:16 -07:00
bors
09b4525f84
auto merge of #7113 : alexcrichton/rust/banned-warnings, r=cmr
...
Reopening of #7031 , Closes #6963
I imagine though that this will bounce in bors once or twice... Because attributes can't be cfg(stage0)'d off, there's temporarily a lot of new stage0/stage1+ code.
2013-06-26 00:56:04 -07:00
Luqman Aden
ca2966c6d0
Change finalize -> drop.
2013-06-25 21:14:39 -04:00
Alex Crichton
c109bed15b
Deny common lints by default for lib{std,extra}
2013-06-25 17:39:43 -07:00
Eric Reed
34b1135b59
Converted UdpSocket into a newtype struct and (dis)connecting uses move semantics rather than ~.
2013-06-25 17:05:59 -07:00
Eric Reed
f604686295
converted UvUdpSocket into a newtype struct
2013-06-25 17:04:28 -07:00
Eric Reed
c5b19f0bf9
changed outdated match on IpAddr
2013-06-25 16:04:09 -07:00
Eric Reed
d0c812f2a8
IPv6 struct
2013-06-25 16:03:24 -07:00
Eric Reed
2c5cfe1037
removed obsolete FIXMEs. formatting changes.
2013-06-25 16:02:51 -07:00