]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #7265 : brson/rust/io-upstream, r=brson
authorbors <bors@rust-lang.org>
Wed, 10 Jul 2013 01:28:46 +0000 (18:28 -0700)
committerbors <bors@rust-lang.org>
Wed, 10 Jul 2013 01:28:46 +0000 (18:28 -0700)
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.

1  2 
src/libstd/os.rs
src/libstd/rt/global_heap.rs
src/libstd/vec.rs

Simple merge
Simple merge
index 2d730b7a6a2004efdd0f76c434dd3be2acc6e522,1188cfbe595078ad713dbac70d88b4770fb7c033..4b719080f8436a3a7366e124bc870f50925fe0a8
@@@ -1169,14 -1165,10 +1165,14 @@@ impl<T> OwnedVector<T> for ~[T] 
                  let ptr: *mut *mut raw::VecRepr = cast::transmute(self);
                  let td = get_tydesc::<T>();
                  if contains_managed::<T>() {
-                     vec_reserve_shared_actual(td, ptr as **raw::VecRepr, n as libc::size_t);
+                     ::at_vec::raw::reserve_raw(td, ptr, n);
                  } else {
                      let alloc = n * sys::nonzero_size_of::<T>();
 -                    *ptr = realloc_raw(*ptr as *mut c_void, alloc + size_of::<raw::VecRepr>())
 +                    let size = alloc + size_of::<raw::VecRepr>();
 +                    if alloc / sys::nonzero_size_of::<T>() != n || size < alloc {
 +                        fail!("vector size is too large: %u", n);
 +                    }
 +                    *ptr = realloc_raw(*ptr as *mut c_void, size)
                             as *mut raw::VecRepr;
                      (**ptr).unboxed.alloc = alloc;
                  }