Skip to content

Commit fb2a6a0

Browse files
authored
Merge pull request #155 from zflcs/main
Remove redundant operation about user thread stack
2 parents 29db2e2 + d6b54ee commit fb2a6a0

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)