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:
parent
d830fcc6eb
commit
018d60509c
29 changed files with 461 additions and 600 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue