diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-12-14 17:03:45 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-12-14 18:35:39 +0100 |
| commit | 6b96827ae971cec1f1bf83245d8356481e76b644 (patch) | |
| tree | 464efef1cb6e620d308b9d0a14fe386592abd5a0 /src/libstd/sys | |
| parent | 4dfb91d238bc1f43ae9494d6fa9fa23697bb5630 (diff) | |
| download | rust-6b96827ae971cec1f1bf83245d8356481e76b644.tar.gz rust-6b96827ae971cec1f1bf83245d8356481e76b644.zip | |
Remove dead code
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/cloudabi/thread.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/redox/thread.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/sgx/thread.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/unix/thread.rs | 21 | ||||
| -rw-r--r-- | src/libstd/sys/wasm/thread.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread.rs | 1 |
6 files changed, 0 insertions, 26 deletions
diff --git a/src/libstd/sys/cloudabi/thread.rs b/src/libstd/sys/cloudabi/thread.rs index a76e1fa3345..54c79114be4 100644 --- a/src/libstd/sys/cloudabi/thread.rs +++ b/src/libstd/sys/cloudabi/thread.rs @@ -119,7 +119,6 @@ pub mod guard { pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } fn min_stack_size(_: *const libc::pthread_attr_t) -> usize { diff --git a/src/libstd/sys/redox/thread.rs b/src/libstd/sys/redox/thread.rs index ff861805382..ca014fd576b 100644 --- a/src/libstd/sys/redox/thread.rs +++ b/src/libstd/sys/redox/thread.rs @@ -92,5 +92,4 @@ pub mod guard { pub type Guard = !; pub unsafe fn current() -> Option<Guard> { None } pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } diff --git a/src/libstd/sys/sgx/thread.rs b/src/libstd/sys/sgx/thread.rs index 9de12a5e6f1..9f3c4536cb5 100644 --- a/src/libstd/sys/sgx/thread.rs +++ b/src/libstd/sys/sgx/thread.rs @@ -97,5 +97,4 @@ pub mod guard { pub type Guard = !; pub unsafe fn current() -> Option<Guard> { None } pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 4ff060018ae..e0d2c620498 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -211,7 +211,6 @@ pub mod guard { pub type Guard = Range<usize>; pub unsafe fn current() -> Option<Guard> { None } pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } @@ -355,26 +354,6 @@ pub mod guard { } } - pub unsafe fn deinit() { - if !cfg!(target_os = "linux") { - if let Some(stackaddr) = get_stack_start_aligned() { - // Remove the protection on the guard page. - // FIXME: we cannot unmap the page, because when we mmap() - // above it may be already mapped by the OS, which we can't - // detect from mmap()'s return value. If we unmap this page, - // it will lead to failure growing stack size on platforms like - // macOS. Instead, just restore the page to a writable state. - // This ain't Linux, so we probably don't need to care about - // execstack. - let result = mprotect(stackaddr, PAGE_SIZE, PROT_READ | PROT_WRITE); - - if result != 0 { - panic!("unable to reset the guard page"); - } - } - } - } - #[cfg(any(target_os = "macos", target_os = "bitrig", target_os = "openbsd", diff --git a/src/libstd/sys/wasm/thread.rs b/src/libstd/sys/wasm/thread.rs index 3d74ffdc14a..f9abb0b825a 100644 --- a/src/libstd/sys/wasm/thread.rs +++ b/src/libstd/sys/wasm/thread.rs @@ -68,7 +68,6 @@ pub mod guard { pub type Guard = !; pub unsafe fn current() -> Option<Guard> { None } pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } cfg_if! { diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index 1a97dd10ced..621ae2fda58 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -98,5 +98,4 @@ pub mod guard { pub type Guard = !; pub unsafe fn current() -> Option<Guard> { None } pub unsafe fn init() -> Option<Guard> { None } - pub unsafe fn deinit() {} } |
