Skip to content

Commit 889a783

Browse files
committed
rt: Remove rust_task::rust_sp
1 parent d39ea47 commit 889a783

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/rt/rust_task.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ rust_task::rust_task(rust_task_thread *thread, rust_task_list *state,
219219
DLOG(thread, task, "sizeof(task) = %d (0x%x)", sizeof *this, sizeof *this);
220220

221221
stk = new_stk(thread, this, init_stack_sz);
222-
rust_sp = stk->end;
223222
if (supervisor) {
224223
supervisor->ref();
225224
}
@@ -336,7 +335,7 @@ rust_task::start(spawn_fn spawnee_fn,
336335

337336
I(thread, stk->data != NULL);
338337

339-
char *sp = (char *)rust_sp;
338+
char *sp = (char *)stk->end;
340339

341340
sp -= sizeof(spawn_args);
342341

src/rt/rust_task.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
5353
bool notify_enabled;
5454
chan_handle notify_chan;
5555

56-
uintptr_t rust_sp; // Saved sp when not running.
57-
5856
context ctx;
5957
stk_seg *stk;
6058
uintptr_t runtime_sp; // Runtime sp while task running.

0 commit comments

Comments
 (0)