summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-08-02std: Implement SingleThreaded spawn mode for newschedBrian Anderson-16/+107
2013-08-01Fix calling destructor on uninitialized dynamic library crash.Steven Stewart-Gallus-36/+70
A test case was also created for this situation to prevent the problem occuring again. A similar problem was also fixed for the symbol method. There was some minor code cleanup.
2013-08-02replace `range` with an external iteratorDaniel Micay-90/+84
2013-08-01str: Add method .into_owned(self) -> ~str to StrKevin Ballard-0/+12
The method .into_owned() is meant to be used as an optimization when you need to get a ~str from a Str, but don't want to unnecessarily copy it if it's already a ~str. This is meant to ease functions that look like fn foo<S: Str>(strs: &[S]) Previously they could work with the strings as slices using .as_slice(), but producing ~str required copying the string, even if the vector turned out be a &[~str] already.
2013-08-01modified local to include an implementation for try_unsafe_borrow::<Task> so ↵toddaaro-10/+17
that the log methods will work
2013-08-01fixed incorrect handling of returned scheduler option and restructed ↵toddaaro-75/+64
scheduler functions slightly
2013-08-01minor tweaks - unboxed the coroutine so that it is no longer a ~ pointer ↵toddaaro-32/+72
inside the task struct, and also added an assert to verify that send is never called inside scheduler context as it is undefined (BROKEN) if that happens
2013-08-01Fixed a race where a scheduler configured to only run tasks pinned to it ↵toddaaro-8/+35
would "bounch" a regular task in and out of the work queue without allowing a different scheduler to run it.
2013-08-01Have linked failure tests run on the new scheduler instead of requiring ↵Ben Blum-79/+152
RUST_NEWRT to test.
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-1022/+887
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
2013-08-01Temporary workaround to prevent taskgroup cleanup code from failing without ↵Ben Blum-3/+13
an exception handler.
2013-08-01Make a forgotten assert in comm be cfg(test)-dependentBen Blum-3/+1
2013-08-01Document task killing design and relaxed barrier rationale.Ben Blum-1/+57
2013-08-01Relax some atomic barriers. Loosen up all that tension. There, doesn't that ↵Ben Blum-22/+23
feel good?
2013-08-01auto merge of #8190 : thestinger/rust/for, r=thestingerbors-255/+243
2013-08-01Add a boatload of Linux x86/x86-64/arm errnosCorey Richardson-0/+107
2013-08-01migrate to foreachDaniel Micay-2/+2
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-54/+53
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01std: Replace `for` with `do { .. }` expr in std::gcblake2-ppc-62/+52
Change all users of old-style for with internal iterators to using `do`-loops. The code in stackwalk.rs does not actually implement the looping protocol (no break on return false). The code in gc.rs does not use loop breaks, nor does any code using it. We remove the capacity to break from the loops in std::gc and implement the walks using `do { .. }` expressions. No behavior change.
2013-08-01std: Remove the internal iterator methods from trait Setblake2-ppc-33/+1
.intersection(), .union() etc methods in trait std::container::Set use internal iters. Remove these methods from the trait. I reported issue #8154 for the reinstatement of iterator-based set algebra methods to the Set trait. For bitv and treemap, that lack Iterator implementations of set operations, preserve them as methods directly on the types themselves. For HashSet, these methods are replaced by the present .union_iter() etc.
2013-08-01std: Replace `for` with `do { .. }` expr where internal iterators are usedblake2-ppc-71/+86
2013-08-01std: Use `do` blocks instead of `for` with .iter_bytes()blake2-ppc-33/+49
2013-08-01auto merge of #8164 : brson/rust/noportset, r=pcwaltonbors-81/+2
...haredChan.
2013-08-01auto merge of #8158 : bblum/rust/task-cleanup, r=brsonbors-74/+139
r? @brson
2013-08-01auto merge of #8155 : stepancheg/rust/unit-zero, r=alexcrichtonbors-0/+11
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-215/+220
2013-07-31auto merge of #8162 : thestinger/rust/no-copy, r=brsonbors-47/+47
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-47/+47
2013-07-31extra: Remove dbg module and rt support codeBrian Anderson-2/+0
This stuff is ancient, unused, and tied to oldsched
2013-07-31std: Remove PortSet. Not supported by new scheduler. Replace uses with ↵Brian Anderson-81/+2
SharedChan.
2013-07-31auto merge of #8151 : sanxiyn/rust/atomicrmw, r=cmrbors-82/+0
#8039 broke ARM build, and nothing uses these yet.
2013-07-31Move atomically to unstable::sync, and document what it actually does. Close ↵Ben Blum-62/+57
#7872.
2013-07-31Give tasks useful names. #2891Ben Blum-12/+82
2013-07-31Implement Zero for unitStepan Koltsov-0/+11
2013-07-31Revert atomicrmw {max, min, umax, umin}Seo Sanghyeon-82/+0
2013-07-31auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwaltonbors-173/+67
This removes a bunch of options from the task builder interface that are irrelevant to the new scheduler and were generally unused anyway. It also bumps the stack size of new scheduler tasks so that there's enough room to run rustc and changes the interface to `Thread` to not implicitly join threads on destruction, but instead require an explicit, and mandatory, call to `join`.
2013-07-31auto merge of #8138 : Dretch/rust/posix-path-push, r=pcwaltonbors-4/+22
\ is allowed inside file names on linux, for example my system has a file at: `/run/udev/firmware-missing/intel-ucode\x2f06-3a-09`
2013-07-30auto merge of #8008 : bblum/rust/select, r=brsonbors-252/+769
Main logic in ```Implement select() for new runtime pipes.```. The guts of the ```PortOne::try_recv()``` implementation are now split up across several functions, ```optimistic_check```, ```block_on```, and ```recv_ready```. There is one weird FIXME I left open here, in the "implement select" commit -- an assertion I couldn't get to work in the receive path, on an invariant that for some reason doesn't hold with ```SharedPort```. Still investigating this.
2013-07-30std: Remove foreign_stack_size spawn option. Irrelevant to future FFI changesBrian Anderson-16/+3
2013-07-30std: Remove get_task function. UnusedBrian Anderson-15/+0
2013-07-30auto merge of #8115 : bjz/rust/num-traits, r=brsonbors-23/+28
Continues #4819
2013-07-30No longer treat \ as a path separator on posix systems.Gareth Smith-4/+22
2013-07-30std: Remove CurrentScheduler spawn mode. UnusedBrian Anderson-13/+2
2013-07-30std: Remove ExistingScheduler spawn mode. UnusedBrian Anderson-17/+2
2013-07-30std: Remove PlatformThread spawn mode. ObsoleteBrian Anderson-22/+2
2013-07-30std: Remove ThreadPerTask spawn mode. UnimplementedBrian Anderson-6/+1
2013-07-30std: Remove ManualThreads spawn modeBrian Anderson-46/+1
2013-07-30std::rt: Change Thread interface to require an explicit joinBrian Anderson-43/+61
Makes it more obvious what's going on
2013-07-30std::rt: Use 2MB stacksBrian Anderson-1/+1
Seems to be around the minimum needed by rustc without split stacks
2013-07-30std: Mark the static constants in str.rs as privateblake2-ppc-10/+10
static variables are pub by default, which is not reflected in our code (we need to use priv).