about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-12-06 17:03:54 -0800
committerBrian Anderson <banderson@mozilla.com>2011-12-06 21:45:53 -0800
commit5d1a1dc4203f8ae77e2e9c5cba393887f0b7d762 (patch)
treee8d3d5d7fe77500c5abc1ead6bcec1efdd6c6f4d /src/rt/rust_task.cpp
parent3d7b89bc4dc63632ee0003869811933ddc1962e9 (diff)
downloadrust-5d1a1dc4203f8ae77e2e9c5cba393887f0b7d762.tar.gz
rust-5d1a1dc4203f8ae77e2e9c5cba393887f0b7d762.zip
rt: Rename stk_seg.limit to stk_seg.end
rust_task is using the word limit it two ways, so one has to change.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 888c9ac701a..0f97a0a6853 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -51,8 +51,8 @@ new_stk(rust_scheduler *sched, rust_task *task, size_t minsz)
     LOGPTR(task->sched, "new stk", (uintptr_t)stk);
     memset(stk, 0, sizeof(stk_seg));
     stk->next = task->stk;
-    stk->limit = (uintptr_t) &stk->data[minsz + RED_ZONE_SIZE];
-    LOGPTR(task->sched, "stk limit", stk->limit);
+    stk->end = (uintptr_t) &stk->data[minsz + RED_ZONE_SIZE];
+    LOGPTR(task->sched, "stk end", stk->end);
     stk->valgrind_id =
         VALGRIND_STACK_REGISTER(&stk->data[0],
                                 &stk->data[minsz + RED_ZONE_SIZE]);
@@ -106,7 +106,7 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
     user.notify_enabled = 0;
 
     stk = new_stk(sched, this, 0);
-    user.rust_sp = stk->limit;
+    user.rust_sp = stk->end;
     if (supervisor) {
         supervisor->ref();
     }
@@ -582,7 +582,7 @@ rust_task::new_stack(size_t stk_sz, void *args_addr, size_t args_sz) {
 
     stk_seg *stk_seg = new_stk(sched, this, stk_sz + args_sz);
 
-    uint8_t *new_sp = (uint8_t*)stk_seg->limit;
+    uint8_t *new_sp = (uint8_t*)stk_seg->end;
     size_t sizeof_retaddr = sizeof(void*);
     // Make enough room on the new stack to hold the old stack pointer
     // in addition to the function arguments
@@ -608,7 +608,7 @@ rust_task::record_stack_limit() {
     // account for those 256 bytes.
     const unsigned LIMIT_OFFSET = 256;
     A(sched,
-      (uintptr_t)stk->limit - RED_ZONE_SIZE
+      (uintptr_t)stk->end - RED_ZONE_SIZE
       - (uintptr_t)stk->data >= LIMIT_OFFSET,
       "Stack size must be greater than LIMIT_OFFSET");
     record_sp(stk->data + LIMIT_OFFSET + RED_ZONE_SIZE);
@@ -627,9 +627,9 @@ rust_task::reset_stack_limit() {
     uintptr_t sp = get_sp();
     // Not positive these bounds for sp are correct.
     // I think that the first possible value for esp on a new
-    // stack is stk->limit, which points one word in front of
+    // stack is stk->end, which points one word in front of
     // the first work to be pushed onto a new stack.
-    while (sp <= (uintptr_t)stk->data || stk->limit < sp) {
+    while (sp <= (uintptr_t)stk->data || stk->end < sp) {
         del_stk(this, stk);
         A(sched, stk != NULL, "Failed to find the current stack");
     }