about summary refs log tree commit diff
path: root/src/libstd/os.rs
AgeCommit message (Collapse)AuthorLines
2013-07-22std: Move change_dir_locked to unstable. #7870Brian Anderson-40/+0
2013-07-22std::rt: Stop using unstable::global in change_dir_lockedBrian Anderson-14/+26
2013-07-22auto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brsonbors-2/+2
2013-07-22new snapshotDaniel Micay-3/+0
2013-07-21Remove what appears to be redundant indirection fromGareth Smith-2/+2
os::list_dir_path.
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-6/+6
Place `pub` or `priv` on individual items instead.
2013-07-18Fix warnings in libstd and librusti testsblake2-ppc-1/+0
2013-07-17librustc: Remove the `Copy` bound from the language.Patrick Walton-4/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-9/+12
2013-07-14Make TLS keys actually take up spaceAlex Crichton-1/+1
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-14Purge the last remnants of the old TLS apiAlex Crichton-9/+8
Closes #3273
2013-07-11auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwaltonbors-2/+2
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-11Remove all external requirements of `@` from TLSAlex Crichton-1/+1
Closes #6004
2013-07-09auto merge of #7265 : brson/rust/io-upstream, r=brsonbors-6/+24
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo. [Here](https://github.com/brson/rust/blob/e1555f9b5628af2b6c6ed344cad621399cb7684d/src/libstd/rt/mod.rs#L201) is the current runtime setup code. About half of this has already been reviewed.
2013-07-09Rename local_data methods/types for less keystrokesAlex Crichton-2/+2
2013-07-09std: Make os::set_exit_status work with newschedBrian Anderson-2/+9
2013-07-09os: introduce cross-platform MemoryMap bindingsFedor Indutny-0/+353
Basically, one may just do: MemoryMap::new(16, ~[ MapExecutable, MapReadable, MapWritable ]) And executable+readable+writable chunk of at least 16 bytes size will be allocated and freed with the result of `MemoryMap::new`.
2013-07-08Merge remote-tracking branch 'mozilla/master'Brian Anderson-8/+8
Conflicts: src/libextra/test.rs src/libstd/rt/global_heap.rs src/libstd/unstable/lang.rs src/libstd/vec.rs
2013-07-03Merge remote-tracking branch 'mozilla/master'Brian Anderson-35/+36
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-04Convert vec::{as_imm_buf, as_mut_buf} to methods.Huon Wilson-5/+5
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-3/+3
iterators.
2013-06-30auto merge of #7487 : huonw/rust/vec-kill, r=cmrbors-2/+2
Continuation of #7430. I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30Convert vec::{rposition, rposition_elem, position_elem, contains} to methods.Huon Wilson-2/+2
2013-06-30simplify the exchange allocatorDaniel Micay-3/+3
* stop using an atomic counter, this has a significant cost and valgrind will already catch these leaks * remove the extra layer of function calls * remove the assert of non-null in free, freeing null is well defined but throwing a failure from free will not be * stop initializing the `prev`/`next` pointers * abort on out-of-memory, failing won't necessarily work
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-1/+1
for making them noncopyable.
2013-06-28librustc: Fix even *MORE* merge fallout!Patrick Walton-1/+1
2013-06-28Rewrite each_path to allow performance improvements in the future.Patrick Walton-1/+5
Instead of determining paths from the path tag, we iterate through modules' children recursively in the metadata. This will allow for lazy external module resolution.
2013-06-27auto merge of #7430 : huonw/rust/vec-kill, r=thestingerbors-4/+3
2013-06-28Convert vec::{push, push_all, push_all_move} to methods.Huon Wilson-3/+2
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-1/+1
2013-06-27auto merge of #7361 : brson/rust/incoming, r=brsonbors-1/+1
2013-06-25Merge remote-tracking branch 'mozilla/master' into incomingBrian Anderson-1/+1
Conflicts: src/librustc/middle/astencode.rs src/librustc/middle/check_const.rs
2013-06-25Deny common lints by default for lib{std,extra}Alex Crichton-13/+8
2013-06-24Merge remote-tracking branch 'reusee/master' into HEADBrian Anderson-1/+1
2013-06-24libc: (u)int => c_(u)int for constsFedor Indutny-1/+1
2013-06-23vec: remove BaseIter implementationDaniel Micay-6/+7
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22replaced some 'std::' with 'extra::' in commentsreus-1/+1
2013-06-21std::rt: Support os::argsBrian Anderson-4/+13
2013-06-21libstd: cleanup warningsJames Miller-6/+4
2013-06-16auto merge of #7123 : huonw/rust/more-str, r=thestingerbors-1/+1
Moves all the remaining functions that could reasonably be methods to be methods, except for some FFI ones (which I believe @erickt is working on, possibly) and `each_split_within`, since I'm not really sure the details of it (I believe @kimundi wrote the current implementation, so maybe he could convert it to an external iterator method on `StrSlice`, e.g. `word_wrap_iter(&self) -> WordWrapIterator<'self>`, where `WordWrapIterator` impls `Iterator<&'self str>`. It probably won't be too hard, since it's already a state machine.) This also cleans up the comparison impls for the string types, except I'm not sure how the lang items `eq_str` and `eq_str_uniq` need to be handled, so they (`eq_slice` and `eq`) remain stand-alone functions.
2013-06-15fix testDaniel Micay-3/+4
2013-06-16std: convert str::to_utf16 to a method.Huon Wilson-1/+1
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-2/+2
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-11option: remove redundant old_iter implsDaniel Micay-1/+1
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-6/+7
2013-06-10std: replace str::each_split* with an iteratorHuon Wilson-3/+3
2013-06-08rm some uses of to_mut_unsafe_ptrDaniel Micay-1/+1
2013-05-30Remove a bunch of unnecessary allocations and copiesBjörn Steinbrink-3/+2
2013-05-30Require documentation by default for libstdAlex Crichton-2/+28
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2