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
0e1be5ff9e
Fix linked failure tests to block forever instead of looping around yield.
2013-07-20 05:08:58 -04:00
Ben Blum
728edb5af6
(cleanup) impl TaskSet
2013-07-20 05:08:58 -04:00
Ben Blum
6d9184609a
(cleanup) Don't check taskgroup generation monotonicity unless cfg(test).
2013-07-20 05:08:58 -04:00
Ben Blum
87bbcb579a
(cleanup) Modernize taskgroup code for the new borrow-checker.
2013-07-20 05:08:58 -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
e2a42416dd
Add option::take(), the building block of the option::take_* family.
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
Ben Blum
2a99163f5d
Add UnsafeAtomicRcBox::try_unwrap()
2013-07-20 05:08:55 -04:00
Ben Blum
10a400ffaa
Reimplement ARC::unwrap() and friends.
2013-07-20 05:08:55 -04:00
Ben Blum
55adc4467b
Add AtomicOption::fill() and AtomicOption::is_empty()
2013-07-20 05:08:55 -04:00
Ben Blum
28c9ba91d8
Remove redundant Atomic{Ui,I}nt types from unstable::sync
2013-07-20 05:08:55 -04:00
Ben Blum
5a9b33a76d
Add Option::take_map{,_default}()
2013-07-20 05:08:55 -04:00
Ben Blum
96c1082f0f
Add Either::expect_{left,right}
2013-07-20 05:08:55 -04:00
Brian Anderson
ddd8c156c6
std: Remove old magic core mod
2013-07-19 21:01:24 -04:00
Daniel Micay
404de4f4ae
iterator: impl DoubleEndedIterator for adaptors
2013-07-19 20:37:37 -04:00
bors
3514a5af06
auto merge of #7857 : blake2-ppc/rust/fix-test-warnings, r=alexcrichton
...
Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes.
2013-07-18 20:55:38 -07:00
bors
b70c045f38
auto merge of #7856 : brson/rust/no-thread-per-core, r=pcwalton
...
This doesn't make sense under the new scheduler.
2013-07-18 19:10:41 -07:00
bors
f28e581268
auto merge of #7854 : brson/rust/rt-test-threads, r=pcwalton
2013-07-18 17:19:41 -07:00
bors
f83c118f42
auto merge of #7833 : blake2-ppc/rust/hashmap-consume, r=alexcrichton
...
Updated all users of HashMap, HashSet ::consume() to use
.consume_iter().
Since .consume_iter() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
Addresses issue #7719
2013-07-18 10:19:44 -07:00
bors
559d2ef925
auto merge of #7842 : thestinger/rust/closure, r=huonw
2013-07-18 08:37:39 -07:00
blake2-ppc
7ef9e722b8
hashmap: Remove .consume() has rename .consume_iter() to .consume()
...
Updated all users of HashMap, HashSet old .consume() to use .consume()
with a for loop.
Since .consume() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
2013-07-18 15:03:59 +02:00
Daniel Micay
ce16644677
repr: add a test case for @mut inside another type
2013-07-18 00:15:20 -04:00
Daniel Micay
2988d3f5c6
fix repr of @mut vectors
2013-07-18 00:15:17 -04:00
blake2-ppc
ff9b75f26d
Fix warnings in libstd and librusti tests
2013-07-18 02:18:56 +02:00
Daniel Micay
0c7b220f20
fix repr of unique vectors with stage0 libstd
...
Closes #7860
2013-07-17 19:09:18 -04:00
Patrick Walton
66a9b7d5bd
libsyntax: Remove some multi-gigabyte clones that were preventing bootstrapping on Windows.
2013-07-17 14:57:56 -07:00
Patrick Walton
dc4bf173f8
test: Fix tests.
2013-07-17 14:57:55 -07:00
Patrick Walton
88fe4ae09c
librustc: Remove the Copy
bound from the language.
2013-07-17 14:57:54 -07:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
e20549ff19
librustc: Remove all uses of the Copy
bound.
2013-07-17 14:57:53 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Patrick Walton
b4e674f6e6
librustc: Add a lint mode for unnecessary copy
and remove a bunch of them.
2013-07-17 14:56:42 -07:00
Daniel Micay
0bc204e74d
rm unnecessary stage0 zero_memory
fn
2013-07-17 14:08:54 -04:00
Brian Anderson
b17141370f
std::rt: Rename RUST_TEST_THREADS to RUST_RT_TEST_THREADS
2013-07-17 10:47:05 -07:00
Daniel Micay
0239a06a64
rm unused visit_str method from TyVisitor
2013-07-17 13:30:32 -04:00
bors
c032dddf6f
auto merge of #7841 : alexcrichton/rust/tls++, r=huonw
...
Simulates borrow checks for '@mut' boxes, or at least it's the same idea. This allows you to store owned values, but mutate them while they're owned by TLS.
This should remove the necessity for a `pop`/`set` pattern to mutate data structures in TLS.
2013-07-17 02:37:43 -07:00
bors
4bd716ac8e
auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwalton
...
Fixes Issue #7764
Running `make check` I do get a failure:
test rt::io::extensions::test::push_bytes ... ok
rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
/Users/shout/Projects/rust/src/libstd/condition.rs:50
/bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
2013-07-16 21:31:48 -07:00
Alex Crichton
948a62401e
Add a get_mut
method for TLS
...
Simulates borrow checks for '@mut' boxes, or at least it's the same idea.
2013-07-16 20:33:04 -07:00