about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-04-01 00:13:59 -0700
committerBrian Anderson <banderson@mozilla.com>2012-04-01 00:15:04 -0700
commite78396850d8e27138dd06e723de5ad3de0e65950 (patch)
tree3768b6007a00186902b099efe24bf5ee82195cb3 /src/rt/rust_upcall.cpp
parent21064637ed8b8259d1305f21ace12c40b9561706 (diff)
parentde47fcfdf9404d53940099f5e7810bdb2bf37af3 (diff)
downloadrust-e78396850d8e27138dd06e723de5ad3de0e65950.tar.gz
rust-e78396850d8e27138dd06e723de5ad3de0e65950.zip
Merge remote-tracking branch 'brson/mainthread'
Conflicts:
	src/rt/rust_sched_loop.cpp
	src/rt/rust_shape.cpp
	src/rt/rust_task.cpp
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index b5fc36c4dde..def10eb9b21 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -8,7 +8,7 @@
 
 #include "rust_cc.h"
 #include "rust_internal.h"
-#include "rust_task_thread.h"
+#include "rust_sched_loop.h"
 #include "rust_unwind.h"
 #include "rust_upcall.h"
 #include "rust_util.h"
@@ -47,7 +47,7 @@ static void check_stack_alignment() { }
 inline void
 call_upcall_on_c_stack(void *args, void *fn_ptr) {
     check_stack_alignment();
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     task->call_on_c_stack(args, fn_ptr);
 }
 
@@ -62,7 +62,7 @@ extern "C" void record_sp_limit(void *limit);
  */
 extern "C" CDECL void
 upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
 
     // FIXME (1226) - The shim functions generated by rustc contain the
     // morestack prologue, so we need to let them know they have enough
@@ -85,7 +85,7 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
  */
 extern "C" CDECL void
 upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
 
     // FIXME: Because of the hack in the other function that disables the
     // stack limit when entering the C stack, here we restore the stack limit
@@ -116,7 +116,7 @@ struct s_fail_args {
 
 extern "C" CDECL void
 upcall_s_fail(s_fail_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
     LOG_ERR(task, upcall, "upcall fail '%s', %s:%" PRIdPTR,
             args->expr, args->file, args->line);
@@ -142,7 +142,7 @@ struct s_malloc_args {
 
 extern "C" CDECL void
 upcall_s_malloc(s_malloc_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
 
     LOG(task, mem, "upcall malloc(0x%" PRIxPTR ")", args->td);
@@ -179,11 +179,11 @@ struct s_free_args {
 
 extern "C" CDECL void
 upcall_s_free(s_free_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
 
-    rust_task_thread *thread = task->thread;
-    DLOG(thread, mem,
+    rust_sched_loop *sched_loop = task->sched_loop;
+    DLOG(sched_loop, mem,
              "upcall free(0x%" PRIxPTR ", is_gc=%" PRIdPTR ")",
              (uintptr_t)args->ptr);
 
@@ -225,7 +225,7 @@ struct s_shared_malloc_args {
 
 extern "C" CDECL void
 upcall_s_shared_malloc(s_shared_malloc_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
 
     LOG(task, mem, "upcall shared_malloc(%" PRIdPTR ")", args->nbytes);
@@ -253,11 +253,11 @@ struct s_shared_free_args {
 
 extern "C" CDECL void
 upcall_s_shared_free(s_shared_free_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
 
-    rust_task_thread *thread = task->thread;
-    DLOG(thread, mem,
+    rust_sched_loop *sched_loop = task->sched_loop;
+    DLOG(sched_loop, mem,
              "upcall shared_free(0x%" PRIxPTR")",
              (uintptr_t)args->ptr);
     task->kernel->free(args->ptr);
@@ -277,7 +277,7 @@ struct s_shared_realloc_args {
 
 extern "C" CDECL void
 upcall_s_shared_realloc(s_shared_realloc_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
     args->retval = task->kernel->realloc(args->ptr, args->size);
 }
@@ -298,7 +298,7 @@ struct s_vec_grow_args {
 
 extern "C" CDECL void
 upcall_s_vec_grow(s_vec_grow_args *args) {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     LOG_UPCALL_ENTRY(task);
     reserve_vec(task, args->vp, args->new_sz);
     (*args->vp)->fill = args->new_sz;
@@ -320,7 +320,7 @@ extern "C" CDECL void
 upcall_s_str_concat(s_str_concat_args *args) {
     rust_vec *lhs = args->lhs;
     rust_vec *rhs = args->rhs;
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     size_t fill = lhs->fill + rhs->fill - 1;
     rust_vec* v = (rust_vec*)task->kernel->malloc(fill + sizeof(rust_vec),
                                                   "str_concat");
@@ -377,7 +377,7 @@ upcall_rust_personality(int version,
     s_rust_personality_args args = {(_Unwind_Reason_Code)0,
                                     version, actions, exception_class,
                                     ue_header, context};
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
 
     // The personality function is run on the stack of the
     // last function that threw or landed, which is going
@@ -463,7 +463,7 @@ upcall_del_stack() {
 // needs to acquire the value of the stack pointer
 extern "C" CDECL void
 upcall_reset_stack_limit() {
-    rust_task *task = rust_task_thread::get_task();
+    rust_task *task = rust_sched_loop::get_task();
     task->reset_stack_limit();
 }