From d6b54eea7c30028d61ca51b09ee4026327c95096 Mon Sep 17 00:00:00 2001 From: zflcs <1491657576@qq.com> Date: Tue, 26 Nov 2024 11:16:34 +0800 Subject: [PATCH] Remove redundant operation about user thread stack --- user/src/bin/stackful_coroutine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/src/bin/stackful_coroutine.rs b/user/src/bin/stackful_coroutine.rs index 3f619790..3d795c1b 100644 --- a/user/src/bin/stackful_coroutine.rs +++ b/user/src/bin/stackful_coroutine.rs @@ -199,7 +199,7 @@ impl Runtime { available.ctx.x1 = guard as u64; //ctx.x1 is old return address available.ctx.nx1 = f as u64; //ctx.nx2 is new return address - available.ctx.x2 = s_ptr.offset(-32) as u64; //cxt.x2 is sp + available.ctx.x2 = s_ptr as u64; //cxt.x2 is sp } available.state = State::Ready; }