about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-07-30 21:51:18 -0700
committerBrian Anderson <banderson@mozilla.com>2013-07-30 21:51:18 -0700
commit0a87589b94bc1ca17fdfeb35f5b029762fe678a8 (patch)
tree762caf33649956caa4a4121d01f5f30a7fb8faa3 /src
parent11fc1fd48556ff123487cdf16bfb3ab478084970 (diff)
test: Remove a test of the oldsched runtime api
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/rt-sched-1.rs60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/test/run-pass/rt-sched-1.rs b/src/test/run-pass/rt-sched-1.rs
deleted file mode 100644
index e110ac01065..00000000000
--- a/src/test/run-pass/rt-sched-1.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Tests of the runtime's scheduler interface
-
-use std::cast;
-use std::comm::*;
-use std::libc;
-
-pub type sched_id = int;
-pub type task_id = *libc::c_void;
-
-pub type task = *libc::c_void;
-pub type closure = *libc::c_void;
-
-mod rustrt {
-    use super::{closure, sched_id, task, task_id};
-
-    use std::libc;
-
-    extern {
-        pub fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id;
-        pub fn rust_get_sched_id() -> sched_id;
-        pub fn rust_new_task_in_sched(id: sched_id) -> task_id;
-        pub fn start_task(id: task_id, f: closure);
-    }
-}
-
-pub fn main() {
-    unsafe {
-        let (po, ch) = stream();
-        let parent_sched_id = rustrt::rust_get_sched_id();
-        error!("parent %?", parent_sched_id);
-        let num_threads = 1u;
-        let new_sched_id = rustrt::rust_new_sched(num_threads);
-        error!("new_sched_id %?", new_sched_id);
-        let new_task_id = rustrt::rust_new_task_in_sched(new_sched_id);
-        assert!(!new_task_id.is_null());
-        let f: ~fn() = || {
-            unsafe {
-                let child_sched_id = rustrt::rust_get_sched_id();
-                error!("child_sched_id %?", child_sched_id);
-                assert!(child_sched_id != parent_sched_id);
-                assert_eq!(child_sched_id, new_sched_id);
-                ch.send(());
-            }
-        };
-        let fptr = cast::transmute(&f);
-        rustrt::start_task(new_task_id, fptr);
-        cast::forget(f);
-        po.recv();
-    }
-}