std: Get stdtest all passing again

This commit brings the library up-to-date in order to get all tests passing
again
This commit is contained in:
Alex Crichton 2013-12-12 21:38:57 -08:00
parent d830fcc6eb
commit 018d60509c
29 changed files with 461 additions and 600 deletions

View file

@ -333,12 +333,12 @@ mod test {
fn somke_cond() {
static mut lock: Mutex = MUTEX_INIT;
unsafe {
lock.lock();
let t = do Thread::start {
lock.lock();
lock.signal();
lock.unlock();
};
lock.lock();
lock.wait();
lock.unlock();
t.join();

View file

@ -24,11 +24,6 @@
//! detection is not guaranteed to continue in the future. Usage of this module
//! is discouraged unless absolutely necessary.
use rt::task::Task;
use option::None;
use rt::local::Local;
use unstable::intrinsics;
static RED_ZONE: uint = 20 * 1024;
/// This function is invoked from rust's current __morestack function. Segmented
@ -41,6 +36,10 @@ static RED_ZONE: uint = 20 * 1024;
// irrelevant for documentation purposes.
#[cfg(not(test))] // in testing, use the original libstd's version
pub extern "C" fn rust_stack_exhausted() {
use rt::task::Task;
use option::None;
use rt::local::Local;
use unstable::intrinsics;
unsafe {
// We're calling this function because the stack just ran out. We need

View file

@ -161,9 +161,8 @@ impl<T:Send> Exclusive<T> {
mod tests {
use option::*;
use prelude::*;
use super::{Exclusive, UnsafeArc, atomic};
use super::Exclusive;
use task;
use mem::size_of;
#[test]
fn exclusive_new_arc() {