Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/libstd/sys/common/thread_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ pub fn stack_guard() -> uint {

pub fn set(stack_bounds: (uint, uint), stack_guard: uint, thread: Thread) {
THREAD_INFO.with(|c| assert!(c.borrow().is_none()));
match thread.name() {
Some(name) => unsafe { ::sys::thread::set_name(name); },
None => {}
}
THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{
stack_bounds: stack_bounds,
stack_guard: stack_guard,
Expand Down
5 changes: 5 additions & 0 deletions src/libstd/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ use ops::{Drop, FnOnce};
use option::Option::{self, Some, None};
use result::Result::{Err, Ok};
use sync::{Mutex, Condvar, Arc};
use str::Str;
use string::String;
use rt::{self, unwind};
use old_io::{Writer, stdio};
Expand Down Expand Up @@ -280,6 +281,10 @@ impl Builder {
unsafe {
stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top);
}
match their_thread.name() {
Some(name) => unsafe { imp::set_name(name.as_slice()); },
None => {}
}
thread_info::set(
(my_stack_bottom, my_stack_top),
unsafe { imp::guard::current() },
Expand Down