about summary refs log tree commit diff
path: root/src/libstd/sys.rs
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-09 18:48:01 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-09 18:48:01 -0700
commitee59aacac490edd619db1c4e2fcd848f793bc3b9 (patch)
treed4f01cefe67f55b80cfaca641a03b581823eb200 /src/libstd/sys.rs
parentcab6d46e58ea6f7535d8e454f0345eccfae183c4 (diff)
parent6f6dce7bbcfb104a8a1e23b0b93d83cbb770f338 (diff)
downloadrust-ee59aacac490edd619db1c4e2fcd848f793bc3b9.tar.gz
rust-ee59aacac490edd619db1c4e2fcd848f793bc3b9.zip
Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls
Diffstat (limited to 'src/libstd/sys.rs')
-rw-r--r--src/libstd/sys.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys.rs b/src/libstd/sys.rs
index 83ee4cf07c6..3add87bbd1d 100644
--- a/src/libstd/sys.rs
+++ b/src/libstd/sys.rs
@@ -136,7 +136,7 @@ impl FailWithCause for &'static str {
 pub fn begin_unwind_(msg: *c_char, file: *c_char, line: size_t) -> ! {
     use either::Left;
     use option::{Some, None};
-    use rt::{context, OldTaskContext, TaskContext};
+    use rt::{context, OldTaskContext, in_green_task_context};
     use rt::task::Task;
     use rt::local::Local;
     use rt::logging::Logger;
@@ -158,7 +158,7 @@ pub fn begin_unwind_(msg: *c_char, file: *c_char, line: size_t) -> ! {
 
                 // XXX: Logging doesn't work correctly in non-task context because it
                 // invokes the local heap
-                if context == TaskContext {
+                if in_green_task_context() {
                     // XXX: Logging doesn't work here - the check to call the log
                     // function never passes - so calling the log function directly.
                     do Local::borrow::<Task, ()> |task| {