Brian Anderson
33df9fc1d0
std: Remove foreign_stack_size spawn option. Irrelevant to future FFI changes
2013-07-30 17:10:23 -07:00
Brian Anderson
8f835d42d7
std: Remove get_task function. Unused
2013-07-30 17:10:21 -07:00
Brian Anderson
81dda9d9cb
std: Remove CurrentScheduler spawn mode. Unused
2013-07-30 14:23:46 -07:00
Brian Anderson
08480e4fda
std: Remove ExistingScheduler spawn mode. Unused
2013-07-30 14:23:46 -07:00
Brian Anderson
5d2b8d4372
std: Remove PlatformThread spawn mode. Obsolete
2013-07-30 14:23:45 -07:00
Brian Anderson
85fd75ac47
std: Remove ThreadPerTask spawn mode. Unimplemented
2013-07-30 14:23:45 -07:00
Brian Anderson
cb9ee7f5be
std: Remove ManualThreads spawn mode
2013-07-30 14:23:45 -07:00
Ben Blum
fa8102ab4a
Unkillable is not unsafe. Close #7832 .
2013-07-30 13:19:25 -04:00
Ben Blum
9675cd311a
(cleanup) Fix unimplemented message for kill_all in newsched.
2013-07-30 13:19:25 -04:00
Steven Stewart-Gallus
d0b7515aed
Change concurrency primitives to standard naming conventions
...
To be more specific:
`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:06:29 -07: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
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
blake2-ppc
980646a450
Use Option .take() or .take_unwrap() instead of util::replace where possible
2013-07-20 05:12:05 -04: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
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
9ad1997549
Change the HOF context switchers to pass a BlockedTask instead of a ~Task.
2013-07-20 05:08:57 -04:00
Ben Blum
629f6e8d68
Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377 .
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
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
Patrick Walton
e20549ff19
librustc: Remove all uses of the Copy
bound.
2013-07-17 14:57:53 -07: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
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
Austin King
712ac836c6
Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764
2013-07-16 12:47:01 -07:00
Alex Crichton
9fd2ac7428
Make TLS keys actually take up space
...
If the TLS key is 0-sized, then the linux linker is apparently smart enough to
put everything at the same pointer. OSX on the other hand, will reserve some
space for all of them. To get around this, the TLS key now actuall consumes
space to ensure that it gets a unique pointer
2013-07-14 10:15:07 -07:00
Alex Crichton
e3211fa1f1
Purge the last remnants of the old TLS api
...
Closes #3273
2013-07-14 09:29:12 -07:00
Steven Fackler
6b37b5bab7
Split mutable methods out of Set and Map
...
Fixes most of #4989 . I didn't add Persistent{Set,Map} since the only
persistent data structure is fun_treemap and its functionality is
currently too limited to build a trait out of.
2013-07-13 19:44:36 -07:00
bors
07183ea6e7
auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwalton
...
cc #6004 and #3273
This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats:
1. Changing `local_set` to not require `@` is blocked on #7673
2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it...
The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed.
This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
2013-07-11 19:52:37 -07:00
Alex Crichton
11c63eaad2
Fix a soundness problem with get
2013-07-11 00:22:08 -07:00
Alex Crichton
e3fb7062aa
Work around stage0 to remove '@' requirements from TLS
2013-07-11 00:21:26 -07:00
Brian Anderson
1dbcc8b188
std: Remove ThreadPerCore spawn mode. Unused
2013-07-09 17:45:06 -07:00
Alex Crichton
cb5b9a477c
Rename local_data methods/types for less keystrokes
2013-07-09 17:39:49 -07:00
Alex Crichton
5c3a2e7eeb
Change TLS to almost be able to contain owned types
2013-07-09 17:31:01 -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
Alex Crichton
a89af1fa4c
Use purely an owned vector for storing TLS data
2013-07-09 17:31:01 -07:00
Brian Anderson
29c9443d85
std: Add a yield implementation for newsched
2013-07-08 18:06:17 -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
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -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
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
Alex Crichton
b29c368674
Removing a lot of usage of '&const'
2013-06-29 08:35:48 -07:00
Ben Blum
ff4ab9e147
'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable.
2013-06-29 04:39:34 -04:00
Patrick Walton
f6a27cbda2
libextra: Fix even more merge fallout.
2013-06-28 10:47:56 -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
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
bors
22408d9ad5
auto merge of #7269 : luqmana/rust/drop, r=thestinger
...
Finally rename finalize to drop.
Closes #4332 .
2013-06-25 20:29:06 -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
Daniel Micay
e67c48a591
remove each
from vec, HashMap and HashSet
2013-06-25 16:28:02 -04:00
Brian Anderson
b530ca1033
std: Make unlinking and task notification work with newsched
2013-06-24 17:07:03 -07:00
Daniel Micay
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04: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
0702e53576
libstd: cleanup warnings
2013-06-21 02:43:02 +12:00
Graydon Hoare
d904c72af8
replace #[inline(always)] with #[inline]. r=burningtree.
2013-06-18 14:48:48 -07: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
e7b0b71197
Remove moves from *T and implement in another way
2013-06-16 12:47:36 -04:00
Brian Anderson
3208fc36bf
Merge remote-tracking branch 'brson/io-wip' into io
...
Conflicts:
src/libstd/rt/sched.rs
src/libstd/rt/task.rs
src/libstd/rt/test.rs
src/libstd/task/mod.rs
src/libstd/task/spawn.rs
2013-06-15 19:31:46 -07:00
toddaaro
d1ec8b5fb8
redesigned the pinning to pin deal with things on dequeue, not on enqueue
2013-06-14 12:17:56 -07:00
Brian Anderson
90fbe38f00
std::rt: Tasks must have an unwinder. Simpler
2013-06-13 23:18:49 -07:00
Brian Anderson
fd148cd3e2
std::rt: Change the Task constructors to reflect a tree
2013-06-13 23:18:49 -07:00
Steven Stewart-Gallus
d9d50a5bd4
Remove unused imports
...
I was able to remove unused imports, and fix the following warnings
src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)]
src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)]
src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)]
src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)]
I was unable to fix the following unused import warnings. The code
here was weird.
src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)]
src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13 10:46:17 -07:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
toddaaro
d64d26cd39
debugged a compiler ICE when merging local::borrow changes into the main io branch and modified the incoming new file lang.rs to be api-compatible
2013-06-10 15:29:02 -07:00
Ben Blum
8081aea3b8
Tag a bunch of destructors that need mutable self with FIXME for #4330 . Close #4943 .
2013-06-10 18:18:04 -04:00
Philipp Brüschweiler
34ee63e93b
std::cell: Modernize constructors
...
Part of #3853
2013-06-04 12:03:58 +02:00
Patrick Walton
5fb254695b
Remove all uses of pub impl
. rs=style
2013-06-01 09:18:27 -07:00
Daniel Farina
aef1e10eba
Remove unnecessary 'use' forms
...
Fix a laundry list of warnings involving unused imports that glutted
up compilation output. There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.
2013-05-30 13:08:18 -07:00
Alex Crichton
007651cd26
Require documentation by default for libstd
...
Adds documentation for various things that I understand.
Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-30 01:02:55 -05:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
aeda178011
librustc: Redo the unsafe checker and make unsafe methods not callable from safe code
2013-05-29 19:04:50 -07:00
Lindsey Kuper
beec6e4b21
Get rid of no-longer-needed #[doc(hidden)] attributes.
...
There were several old `#[doc(hidden)]` attributes in libstd and
libextra, left over from when rustdoc didn't hide private
definitions, tagged with `FIXME #3538`.
Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes
as well as the FIXMEs, but I left `#[doc(hidden)]` in
libstd/task/spawn.rs and libstd/task/rt.rs since those two are
apparently `pub`, as well as in libextra/std.rc since std/extra is
`pub`.
2013-05-27 13:29:48 -04:00
Patrick Walton
0c820d4123
libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
...
This only changes the directory names; it does not change the "real"
metadata names.
2013-05-22 21:57:05 -07:00