about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-09-08 15:53:46 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-09-11 11:19:20 -0700
commitf4be2026dfb507e5db919cc5df8fd934e05fa0b8 (patch)
tree278d5b3916042e7232b7ba98a5ead399a52057eb /src/libstd/thread
parent192c37537bc6ffaee06e8b4099dd09ae43bcfee7 (diff)
downloadrust-f4be2026dfb507e5db919cc5df8fd934e05fa0b8.tar.gz
rust-f4be2026dfb507e5db919cc5df8fd934e05fa0b8.zip
std: Internalize almost all of `std::rt`
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 3a4c3e7eef1..2b7a3deceb7 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -167,10 +167,11 @@ use any::Any;
 use cell::UnsafeCell;
 use fmt;
 use io;
-use rt::{self, unwind};
 use sync::{Mutex, Condvar, Arc};
 use sys::thread as imp;
 use sys_common::thread_info;
+use sys_common::unwind;
+use sys_common::util;
 use time::Duration;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -260,7 +261,7 @@ impl Builder {
                                        -> io::Result<JoinInner<T>> {
         let Builder { name, stack_size } = self;
 
-        let stack_size = stack_size.unwrap_or(rt::min_stack());
+        let stack_size = stack_size.unwrap_or(util::min_stack());
 
         let my_thread = Thread::new(name);
         let their_thread = my_thread.clone();
@@ -383,7 +384,7 @@ pub fn catch_panic<F, R>(f: F) -> Result<R>
     let mut result = None;
     unsafe {
         let result = &mut result;
-        try!(::rt::unwind::try(move || *result = Some(f())))
+        try!(unwind::try(move || *result = Some(f())))
     }
     Ok(result.unwrap())
 }