已更新 2025年7月
RTOS上下文切换 - 步骤 5
[详细示例]
检索到 TaskB 的堆栈指针

必须恢复 TaskB 上下文。RTOS 宏 portRESTORE_CONTEXT 做的第一件事就是 从 TaskB 挂起时获取的拷贝中检索 TaskB 堆栈指针。TaskB 堆栈指针被加载到处理器堆栈指针中, 因此现在 AVR 堆栈指向 TaskB 上下文的顶部。
We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.
If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”
Essential cookies are necessary to provide our site and services and cannot be deactivated. They are usually set in response to your actions on the site, such as setting your privacy preferences, signing in, or filling in forms.
Performance cookies provide anonymous statistics about how customers navigate our site so we can improve site experience and performance. Approved third parties may perform analytics on our behalf, but they cannot use the data for their own purposes.
Functional cookies help us provide useful site features, remember your preferences, and display relevant content. Approved third parties may set these cookies to provide certain site features. If you do not allow these cookies, then some or all of these services may not function properly.
Advertising cookies may be set through our site by us or our advertising partners and help us deliver relevant marketing content. If you do not allow these cookies, you will experience less relevant advertising.
Blocking some types of cookies may impact your experience of our sites. You may review and change your choices at any time by selecting Cookie preferences in the footer of this site. We and selected third-parties use cookies or similar technologies as specified in the AWS Cookie Notice.
We will only store essential cookies at this time, because we were unable to save your cookie preferences.
If you want to change your cookie preferences, try again later using the link in the AWS console footer, or contact support if the problem persists.
文档详细示例
已更新 2025年7月
[详细示例]
必须恢复 TaskB 上下文。RTOS 宏 portRESTORE_CONTEXT 做的第一件事就是 从 TaskB 挂起时获取的拷贝中检索 TaskB 堆栈指针。TaskB 堆栈指针被加载到处理器堆栈指针中, 因此现在 AVR 堆栈指向 TaskB 上下文的顶部。