about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-09-27 17:14:18 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-09-27 18:12:03 -0700
commit9ba86178efc8c5b733202995427c6345ee80ba1c (patch)
treef6ee08f6bab6c555ad2090d2a976b8fc412eb3cd /src/rt/rust_upcall.cpp
parent888e22aacc5a1a666c46c6d69e40e8673bb16c87 (diff)
downloadrust-9ba86178efc8c5b733202995427c6345ee80ba1c.tar.gz
rust-9ba86178efc8c5b733202995427c6345ee80ba1c.zip
rt: Store the task in TLS
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 5e9ff8be809..60802be4ac0 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -1,6 +1,7 @@
 #include "rust_cc.h"
 #include "rust_gc.h"
 #include "rust_internal.h"
+#include "rust_scheduler.h"
 #include "rust_unwind.h"
 #include "rust_upcall.h"
 #include <stdint.h>
@@ -54,7 +55,8 @@ upcall_fail(rust_task *task,
 }
 
 extern "C" CDECL uintptr_t
-upcall_malloc(rust_task *task, size_t nbytes, type_desc *td) {
+upcall_malloc(rust_task *unused_task, size_t nbytes, type_desc *td) {
+    rust_task *task = rust_scheduler::get_task();
     LOG_UPCALL_ENTRY(task);
 
     LOG(task, mem,