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
20 changes: 1 addition & 19 deletions src/libstd/rt/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ mod imp {
let mut native: libc::pthread_t = intrinsics::uninit();
let mut attr: libc::pthread_attr_t = intrinsics::uninit();
assert_eq!(pthread_attr_init(&mut attr), 0);

let min_stack = get_min_stack(&attr);
assert_eq!(pthread_attr_setstacksize(&mut attr,
min_stack + stack as libc::size_t), 0);
stack as libc::size_t), 0);
assert_eq!(pthread_attr_setdetachstate(&mut attr,
PTHREAD_CREATE_JOINABLE), 0);

Expand All @@ -230,18 +228,6 @@ mod imp {
#[cfg(not(target_os = "macos"), not(target_os = "android"))]
pub unsafe fn yield_now() { assert_eq!(pthread_yield(), 0); }

// Issue #6233. On some platforms, putting a lot of data in
// thread-local storage means we need to set the stack-size to be
// larger.
#[cfg(target_os = "linux")]
unsafe fn get_min_stack(attr: &libc::pthread_attr_t) -> libc::size_t {
__pthread_get_minstack(attr)
}
#[cfg(not(target_os = "linux"))]
unsafe fn get_min_stack(_: &libc::pthread_attr_t) -> libc::size_t {
0
}

extern {
fn pthread_create(native: *mut libc::pthread_t,
attr: *libc::pthread_attr_t,
Expand All @@ -261,10 +247,6 @@ mod imp {
fn sched_yield() -> libc::c_int;
#[cfg(not(target_os = "macos"), not(target_os = "android"))]
fn pthread_yield() -> libc::c_int;

// This appears to be glibc specific
#[cfg(target_os = "linux")]
fn __pthread_get_minstack(attr: *libc::pthread_attr_t) -> libc::size_t;
}
}

Expand Down
22 changes: 0 additions & 22 deletions src/test/run-pass/large-thread-local-data.rs

This file was deleted.