diff options
| author | bors <bors@rust-lang.org> | 2013-11-11 10:46:28 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-11 10:46:28 -0800 |
| commit | 0966ec01dcb0ff90e6d483706820794ef8e16c2e (patch) | |
| tree | 7d2032464a17a0ecb160828be5197587a545752d /src/libstd/rt/thread.rs | |
| parent | 4d9b95fada7c97ac1c63099bab1d45ba120958ec (diff) | |
| parent | 1f192430956704ddf263aba0cfb5b8856c547beb (diff) | |
| download | rust-0966ec01dcb0ff90e6d483706820794ef8e16c2e.tar.gz rust-0966ec01dcb0ff90e6d483706820794ef8e16c2e.zip | |
auto merge of #10407 : alexcrichton/rust/no-fixed-stack-segment, r=brson
The commit messages have more details, but this removes all analysis and usage related to fixed_stack_segment and rust_stack attributes. It's now the assumption that we always have "enough stack" and we'll implement detection of stack overflow through other means. The stack overflow detection is currently implemented for rust functions, but it is unimplemented for C functions (we still don't have guard pages).
Diffstat (limited to 'src/libstd/rt/thread.rs')
| -rw-r--r-- | src/libstd/rt/thread.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index b21a8f5981d..5e535d994f9 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -68,8 +68,6 @@ impl Thread { #[cfg(windows)] fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_thread_return, tramp: ~~fn()) -> rust_thread { - #[fixed_stack_segment]; - unsafe { let ptr: *mut libc::c_void = cast::transmute(tramp); CreateThread(ptr::mut_null(), DEFAULT_STACK_SIZE, thread_start, ptr, 0, ptr::mut_null()) @@ -78,7 +76,6 @@ fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_threa #[cfg(windows)] fn native_thread_join(native: rust_thread) { - #[fixed_stack_segment]; use libc::consts::os::extra::INFINITE; unsafe { WaitForSingleObject(native, INFINITE); } } @@ -86,8 +83,6 @@ fn native_thread_join(native: rust_thread) { #[cfg(unix)] fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_thread_return, tramp: ~~fn()) -> rust_thread { - #[fixed_stack_segment]; - use unstable::intrinsics; let mut native: libc::pthread_t = unsafe { intrinsics::uninit() }; @@ -107,13 +102,11 @@ fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_threa #[cfg(unix)] fn native_thread_join(native: rust_thread) { - #[fixed_stack_segment]; unsafe { assert!(pthread_join(native, ptr::null()) == 0) } } impl Drop for Thread { fn drop(&mut self) { - #[fixed_stack_segment]; #[inline(never)]; assert!(self.joined); } } |
