Luqman Aden
a5c6b85091
libstd: Implement some missing tcp methods.
2013-07-25 19:42:19 -04:00
Luqman Aden
005ea3b173
libstd: Add ToStr impl for IpAddr.
2013-07-25 18:27:18 -04:00
Luqman Aden
d6e1a6b237
libstd: Get rid of duplication in {peer, socket}_name and remove extra *.
2013-07-25 15:50:19 -04:00
Luqman Aden
e2bb32bea1
libstd: Handle IPv4-Mapped/Compatible IPv6 addresses.
2013-07-25 05:57:52 -04:00
Luqman Aden
ac40d5323d
libstd: Fix errors when rtdebug! is not a noop.
2013-07-25 05:57:52 -04:00
Luqman Aden
61e741cf71
libstd: Implement {peer, socket}_name for new rt tcp & udp.
2013-07-25 05:57:52 -04:00
bors
330378d1a1
auto merge of #7996 : erickt/rust/cleanup-strs, r=erickt
...
This is a cleanup pull request that does:
* removes `os::as_c_charp`
* moves `str::as_buf` and `str::as_c_str` into `StrSlice`
* converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str`
* renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`.
* renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes`
* and other misc cleanups and minor optimizations
2013-07-24 13:25:36 -07:00
Daniel Micay
4a2d22bdb1
fix compilation on macos/windows
2013-07-24 09:45:21 -04:00
Brian Anderson
6c88e46d4d
std:rt: args module is not used by win/mac. #7951
2013-07-24 09:45:20 -04:00
bors
7f96eb58d2
auto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism
...
Some machinery for enabling #[bench] benchmarks in std and some examples showing how to write them.
2013-07-23 22:46:39 -07:00
Erick Tryzelaar
3b818edeba
std and extra: use as_c_str instead of as_buf in a couple places
...
These uses are assuming the strings are null terminated, so it
should be using `as_c_str` instead of `as_buf`
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
7af56bb921
std: move StrUtil::as_c_str into StrSlice
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9fdec67a67
std: move str::as_buf into StrSlice
2013-07-23 16:56:22 -07:00
Graydon Hoare
3d5fb470fb
std: add #[bench] benchmarks for global and local heaps.
2013-07-22 16:56:10 -07:00
Jeff Olson
3169bb70d8
std: fix for blocked task resume
2013-07-22 15:28:32 -07:00
Jeff Olson
73ab6c60f3
std: make check appeasement
2013-07-22 13:19:05 -07:00
Jeff Olson
155470fc9c
std: minor timer cleanup based on feedback
2013-07-22 13:19:04 -07:00
Jeff Olson
5da29e3278
std: add rt::io::Timer
2013-07-22 13:19:04 -07:00
Jeff Olson
921d99108c
std: add RtioTimer and UvTimer impl atop rt::uv
2013-07-22 13:19:04 -07:00
Daniel Micay
ed67cdb73c
new snapshot
2013-07-22 01:09:48 -04:00
Patrick Walton
06594ed96b
librustc: Remove pub extern
and priv extern
from the language.
...
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00
bors
bb8ca1f52c
auto merge of #7910 : brson/rust/rm-fixme, r=graydon
2013-07-20 15:16:33 -07:00
bors
c5c0252511
auto merge of #7908 : anasazi/rust/fix_udp_mut, r=brson
2013-07-20 13:31:34 -07:00
bors
e3142c5d3e
auto merge of #7858 : bblum/rust/kill, r=brson
...
Some notes about the commits.
Exit code propagation commits:
* ```Reimplement unwrap()``` has the same old code from ```arc::unwrap``` ported to use modern atomic types and finally (it's considerably nicer this way)
* ```Add try_unwrap()``` has some new slightly-tricky (but pretty simple) concurrency primitive code
* ```Add KillHandle``` and ```Add kill::Death``` are the bulk of the logic.
Task killing commits:
* ```Implement KillHandle::kill() and friends```, ```Do a task-killed check```, and ```Add BlockedTask``` implement the killing logic;
* ```Change the HOF context switchers``` turns said logic on
Linked failure commits:
* ```Replace *rust_task ptrs``` adapts the taskgroup code to work for both runtimes
* ```Enable taskgroup code``` does what it says on the tin.
r? @brson
2013-07-20 03:55:39 -07:00
Ben Blum
7ad7911222
Add watched and indestructible spawn modes.
2013-07-20 05:12:04 -04:00
Ben Blum
2183145850
Rename TCB to Taskgroup
2013-07-20 05:12:04 -04:00
Ben Blum
f3c79c4026
Enable taskgroup code for newsched spawns.
2013-07-20 05:12:03 -04:00
Ben Blum
9bbec651df
Replace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning to newsched killing.
2013-07-20 05:08:57 -04:00
Ben Blum
2a7273c71e
Stash a spare kill flag inside tasks, to save two atomic xadds in the blocking fastpath.
2013-07-20 05:08:57 -04:00
Ben Blum
e283c4ddff
Add tests for task killing and blocking.
2013-07-20 05:08:57 -04:00
Ben Blum
a093b5434a
Add test::with_test_task() convenience function.
2013-07-20 05:08:57 -04:00
Ben Blum
9ad1997549
Change the HOF context switchers to pass a BlockedTask instead of a ~Task.
2013-07-20 05:08:57 -04:00
Ben Blum
0101f35f27
Add BlockedTask (wake, try_block, etc) in kill.rs.
2013-07-20 05:08:57 -04:00
Ben Blum
e80efe3fda
Do a task-killed check at the start of task 'timeslices'.
2013-07-20 05:08:56 -04:00
Ben Blum
629f6e8d68
Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377 .
2013-07-20 05:08:56 -04:00
Ben Blum
2a99320583
Add tests for KillHandle
2013-07-20 05:08:56 -04:00
Ben Blum
afc199bea0
Remove join_latch
2013-07-20 05:08:56 -04:00
Ben Blum
6882508b6f
Add kill::Death for task death services and use it in Task.
2013-07-20 05:08:56 -04:00
Ben Blum
52ca256d7b
Add KillHandle and implement exit code propagation to replace join_latch
2013-07-20 05:08:56 -04:00
bors
098709aa63
auto merge of #7855 : brson/rust/rt-overcommit, r=pcwalton
...
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-20 00:37:42 -07:00
Brian Anderson
ddd8c156c6
std: Remove old magic core mod
2013-07-19 21:01:24 -04:00
Brian Anderson
73fccf3e70
std::rt: Remove an obsolete FIXME. #7757
2013-07-19 14:36:05 -07:00
Brian Anderson
49b72bdd77
std::rt: Use a constant 4 threads for multithreaded sched tests. #7772
...
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-19 14:18:50 -07:00
Eric Reed
b03f1e7357
Missed the methods of UdpWatcher.
2013-07-19 13:04:03 -07:00
Eric Reed
968f7f5d3d
Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect that libuv may change the underlying handle.
2013-07-19 13:04:03 -07:00
bors
f28e581268
auto merge of #7854 : brson/rust/rt-test-threads, r=pcwalton
2013-07-18 17:19:41 -07:00
Patrick Walton
dc4bf173f8
test: Fix tests.
2013-07-17 14:57:55 -07:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Brian Anderson
b17141370f
std::rt: Rename RUST_TEST_THREADS to RUST_RT_TEST_THREADS
2013-07-17 10:47:05 -07:00