Skip to content

Commit d6b54ee

Browse files
committed
Remove redundant operation about user thread stack
1 parent 29db2e2 commit d6b54ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

user/src/bin/stackful_coroutine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl Runtime {
199199

200200
available.ctx.x1 = guard as u64; //ctx.x1 is old return address
201201
available.ctx.nx1 = f as u64; //ctx.nx2 is new return address
202-
available.ctx.x2 = s_ptr.offset(-32) as u64; //cxt.x2 is sp
202+
available.ctx.x2 = s_ptr as u64; //cxt.x2 is sp
203203
}
204204
available.state = State::Ready;
205205
}

0 commit comments

Comments
 (0)