about summary refs log tree commit diff
path: root/src/libstd/sys/unix/thread.rs
diff options
context:
space:
mode:
authorSebastian Wicki <gandro@gmx.net>2015-09-21 19:16:24 +0200
committerSebastian Wicki <gandro@gmx.net>2015-09-26 14:10:14 +0200
commitc099cfab061e8464141a1cf85c2bd09536a311d0 (patch)
tree89bc6399b93b16084fd2999991e6d3df6fda1e10 /src/libstd/sys/unix/thread.rs
parent6645ca1a85efcc2c2cc628fe0b34255bc1e56ec7 (diff)
downloadrust-c099cfab061e8464141a1cf85c2bd09536a311d0.tar.gz
rust-c099cfab061e8464141a1cf85c2bd09536a311d0.zip
Add support for the rumprun unikernel
For most parts, rumprun currently looks like NetBSD, as they share the same
libc and drivers. However, being a unikernel, rumprun does not support
process management, signals or virtual memory, so related functions
might fail at runtime. Stack guards are disabled exactly for this reason.

Code for rumprun is always cross-compiled, it uses always static
linking and needs a custom linker.
Diffstat (limited to 'src/libstd/sys/unix/thread.rs')
-rw-r--r--src/libstd/sys/unix/thread.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 83e0a03a234..50e01ecf9fa 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -174,7 +174,7 @@ impl Drop for Thread {
 #[cfg(all(not(target_os = "linux"),
           not(target_os = "macos"),
           not(target_os = "bitrig"),
-          not(target_os = "netbsd"),
+          not(all(target_os = "netbsd", not(target_vendor = "rumprun"))),
           not(target_os = "openbsd")))]
 pub mod guard {
     pub unsafe fn current() -> Option<usize> { None }
@@ -185,7 +185,7 @@ pub mod guard {
 #[cfg(any(target_os = "linux",
           target_os = "macos",
           target_os = "bitrig",
-          target_os = "netbsd",
+          all(target_os = "netbsd", not(target_vendor = "rumprun")),
           target_os = "openbsd"))]
 #[allow(unused_imports)]
 pub mod guard {