Update docs acc to review

This commit is contained in:
renpeiying
2025-11-11 10:27:00 +08:00
parent e14dfb8b5a
commit b3f95ab7b0
2 changed files with 4 additions and 4 deletions
@@ -6,7 +6,7 @@ Call Function with External Stack
Overview
--------
A given function can be executed with a user-allocated stack space which is independent of current task stack. This mechanism can be used to save stack space wasted by tasks which call a common function with intensive stack usage such as ``printf``. The given function can be executed on the shared stack space by calling :cpp:func:`esp_execute_shared_stack_function` and passing it as a parameter.
A given function can be executed with a user-allocated stack space which is independent of current task's stack. This mechanism helps reduce stack usage for tasks that call common functions with heavy stack demands such as ``printf``. The given function can be executed on the shared stack space by calling :cpp:func:`esp_execute_shared_stack_function` and passing it as a parameter.
.. warning::
@@ -32,7 +32,7 @@ Usage
- the size of stack in bytes
- a pointer to the shared stack function
The user-defined function is executed immediately as a callback using the user-allocated space without taking space from current task stack.
The user-defined function is executed immediately as a callback, using a userallocated stack instead of the current tasks stack.
The usage may look like the code below:
@@ -6,7 +6,7 @@
概述
--------
执行某个给定函数时,可以使用用户分配的堆栈空间,且该堆栈空间独立于当前任务的堆栈。如果有多个任务需要用同一个使用大量堆栈空间的函数,如 ``printf``,这一机制能够节省各个任务的堆栈空间。具体而言,将给定函数作为参数传入 :cpp:func:`esp_execute_shared_stack_function` 中,给定函数便会在共享堆栈空间内执行。
执行某个给定函数时,可以使用用户分配的堆栈空间,且该堆栈空间独立于当前任务的堆栈。如果有多个任务需要用同一个使用大量堆栈空间的公共函数,如 ``printf``,这一机制能够节省各个任务的堆栈空间。具体而言,将给定函数作为参数传入 :cpp:func:`esp_execute_shared_stack_function` 中,给定函数便会在共享堆栈空间内执行。
.. warning::
@@ -19,7 +19,7 @@
:esp32p4: - 使用 AI 协处理器
- 调用 vTaskDelete(NULL) 删除当前运行的任务
此外,共享堆栈上运行的函数,或该函数调用的任何函数中调用回溯,回溯信息都可能不正确。这方面的限制十分严格,因此将来 :cpp:func:`esp_execute_shared_stack_function` 可能会被弃用。如有用例必须使用 :cpp:func:`esp_execute_shared_stack_function` 函数才能实现,请提交 `GitHub Issue <https://github.com/espressif/esp-idf/issues>`_。
此外,共享堆栈上运行的函数,或该函数调用的任何函数中调用回溯,回溯信息都可能不正确。这方面的限制十分严格,因此将来 :cpp:func:`esp_execute_shared_stack_function` 可能会被弃用。如有用例必须使用 :cpp:func:`esp_execute_shared_stack_function` 函数才能实现,请提交 `GitHub Issue <https://github.com/espressif/esp-idf/issues>`_。
使用方法