bors
3078e83c3f
auto merge of #8076 : omasanori/rust/cleanup, r=huonw
...
A cleanup suggested on #7922 .
2013-07-27 20:13:22 -07:00
bors
82b29ae5a5
auto merge of #7864 : brson/rust/start-on-main-thread, r=brson
...
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 18:25:24 -07:00
Brian Anderson
34a27db8bf
std::rt: Add start_on_main_thread function
...
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 17:36:14 -07:00
bors
15310ba7c2
auto merge of #8040 : luqmana/rust/rtn, r=brson
...
Implements various missing tcp & udp methods.. Also fixes handling ipv4-mapped/compatible ipv6 addresses and addresses the XXX on `status_to_maybe_uv_error`.
r? @brson
2013-07-27 01:49:35 -07:00
OGINO Masanori
8d654fc41d
Remove unnecessary #[path = "***/mod.rs"] lines.
...
Fixes #7922 .
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-27 15:53:30 +09:00
Alex Crichton
5aaaca0c6a
Consolidate raw representations of rust values
...
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.
As safe method, `repr`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).
2013-07-26 09:53:03 -07:00
Luqman Aden
df67942dcc
libstd: Tests for {peer, socket}_name.
2013-07-26 05:02:53 -04:00
Luqman Aden
037bf3757c
libstd: Implement some missing udp methods.
2013-07-25 22:21:46 -04:00
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