diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-11-06 15:16:04 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-11-11 10:40:34 -0800 |
| commit | 7755ffd0131fa99ca5d58bdd5eab443b44d5a1ff (patch) | |
| tree | c00e95dee93195cb7744c4a37ea1d4d438db9456 /src/libstd/task | |
| parent | 4059b5c4b3b8a57a645982b0770d25f0283dfb06 (diff) | |
| download | rust-7755ffd0131fa99ca5d58bdd5eab443b44d5a1ff.tar.gz rust-7755ffd0131fa99ca5d58bdd5eab443b44d5a1ff.zip | |
Remove #[fixed_stack_segment] and #[rust_stack]
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/mod.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index e75f8f6237f..51c11b69972 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -1145,12 +1145,14 @@ fn test_spawn_sched_childs_on_default_sched() { mod testrt { use libc; - externfn!(fn rust_dbg_lock_create() -> *libc::c_void) - externfn!(fn rust_dbg_lock_destroy(lock: *libc::c_void)) - externfn!(fn rust_dbg_lock_lock(lock: *libc::c_void)) - externfn!(fn rust_dbg_lock_unlock(lock: *libc::c_void)) - externfn!(fn rust_dbg_lock_wait(lock: *libc::c_void)) - externfn!(fn rust_dbg_lock_signal(lock: *libc::c_void)) + extern { + pub fn rust_dbg_lock_create() -> *libc::c_void; + pub fn rust_dbg_lock_destroy(lock: *libc::c_void); + pub fn rust_dbg_lock_lock(lock: *libc::c_void); + pub fn rust_dbg_lock_unlock(lock: *libc::c_void); + pub fn rust_dbg_lock_wait(lock: *libc::c_void); + pub fn rust_dbg_lock_signal(lock: *libc::c_void); + } } #[test] |
